//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension EventBridge {
    // MARK: Enums

    public enum ApiDestinationHttpMethod: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case delete = "DELETE"
        case get = "GET"
        case head = "HEAD"
        case options = "OPTIONS"
        case patch = "PATCH"
        case post = "POST"
        case put = "PUT"
        public var description: String { return self.rawValue }
    }

    public enum ApiDestinationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum ArchiveState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case createFailed = "CREATE_FAILED"
        case creating = "CREATING"
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        case updateFailed = "UPDATE_FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum AssignPublicIp: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionAuthorizationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case apiKey = "API_KEY"
        case basic = "BASIC"
        case oauthClientCredentials = "OAUTH_CLIENT_CREDENTIALS"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionOAuthHttpMethod: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case get = "GET"
        case post = "POST"
        case put = "PUT"
        public var description: String { return self.rawValue }
    }

    public enum ConnectionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case authorized = "AUTHORIZED"
        case authorizing = "AUTHORIZING"
        case creating = "CREATING"
        case deauthorized = "DEAUTHORIZED"
        case deauthorizing = "DEAUTHORIZING"
        case deleting = "DELETING"
        case failedConnectivity = "FAILED_CONNECTIVITY"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EndpointState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case createFailed = "CREATE_FAILED"
        case creating = "CREATING"
        case deleteFailed = "DELETE_FAILED"
        case deleting = "DELETING"
        case updateFailed = "UPDATE_FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EventSourceState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case deleted = "DELETED"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum IncludeDetail: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case full = "FULL"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum LaunchType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ec2 = "EC2"
        case external = "EXTERNAL"
        case fargate = "FARGATE"
        public var description: String { return self.rawValue }
    }

    public enum Level: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case info = "INFO"
        case off = "OFF"
        case trace = "TRACE"
        public var description: String { return self.rawValue }
    }

    public enum PlacementConstraintType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case distinctInstance = "distinctInstance"
        case memberOf = "memberOf"
        public var description: String { return self.rawValue }
    }

    public enum PlacementStrategyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case binpack = "binpack"
        case random = "random"
        case spread = "spread"
        public var description: String { return self.rawValue }
    }

    public enum PropagateTags: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case taskDefinition = "TASK_DEFINITION"
        public var description: String { return self.rawValue }
    }

    public enum ReplayState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "CANCELLED"
        case cancelling = "CANCELLING"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case running = "RUNNING"
        case starting = "STARTING"
        public var description: String { return self.rawValue }
    }

    public enum ReplicationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum RuleState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        case enabledWithAllCloudtrailManagementEvents = "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct ActivateEventSourceRequest: AWSEncodableShape {
        /// The name of the partner event source to activate.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct ApiDestination: AWSDecodableShape {
        /// The ARN of the API destination.
        public let apiDestinationArn: String?
        /// The state of the API destination.
        public let apiDestinationState: ApiDestinationState?
        /// The ARN of the connection specified for the API destination.
        public let connectionArn: String?
        /// A time stamp for the time that the API destination was created.
        public let creationTime: Date?
        /// The method to use to connect to the HTTP endpoint.
        public let httpMethod: ApiDestinationHttpMethod?
        /// The URL to the endpoint for the API destination.
        public let invocationEndpoint: String?
        /// The maximum number of invocations per second to send to the HTTP endpoint.
        public let invocationRateLimitPerSecond: Int?
        /// A time stamp for the time that the API destination was last modified.
        public let lastModifiedTime: Date?
        /// The name of the API destination.
        public let name: String?

        @inlinable
        public init(apiDestinationArn: String? = nil, apiDestinationState: ApiDestinationState? = nil, connectionArn: String? = nil, creationTime: Date? = nil, httpMethod: ApiDestinationHttpMethod? = nil, invocationEndpoint: String? = nil, invocationRateLimitPerSecond: Int? = nil, lastModifiedTime: Date? = nil, name: String? = nil) {
            self.apiDestinationArn = apiDestinationArn
            self.apiDestinationState = apiDestinationState
            self.connectionArn = connectionArn
            self.creationTime = creationTime
            self.httpMethod = httpMethod
            self.invocationEndpoint = invocationEndpoint
            self.invocationRateLimitPerSecond = invocationRateLimitPerSecond
            self.lastModifiedTime = lastModifiedTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case apiDestinationArn = "ApiDestinationArn"
            case apiDestinationState = "ApiDestinationState"
            case connectionArn = "ConnectionArn"
            case creationTime = "CreationTime"
            case httpMethod = "HttpMethod"
            case invocationEndpoint = "InvocationEndpoint"
            case invocationRateLimitPerSecond = "InvocationRateLimitPerSecond"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
        }
    }

    public struct AppSyncParameters: AWSEncodableShape & AWSDecodableShape {
        /// The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service. For more information, see Operations in the AppSync User Guide.
        public let graphQLOperation: String?

        @inlinable
        public init(graphQLOperation: String? = nil) {
            self.graphQLOperation = graphQLOperation
        }

        public func validate(name: String) throws {
            try self.validate(self.graphQLOperation, name: "graphQLOperation", parent: name, max: 1048576)
            try self.validate(self.graphQLOperation, name: "graphQLOperation", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case graphQLOperation = "GraphQLOperation"
        }
    }

    public struct Archive: AWSDecodableShape {
        /// The name of the archive.
        public let archiveName: String?
        /// The time stamp for the time that the archive was created.
        public let creationTime: Date?
        /// The number of events in the archive.
        public let eventCount: Int64?
        /// The ARN of the event bus associated with the archive. Only events from this event bus are sent to the archive.
        public let eventSourceArn: String?
        /// The number of days to retain events in the archive before they are deleted.
        public let retentionDays: Int?
        /// The size of the archive, in bytes.
        public let sizeBytes: Int64?
        /// The current state of the archive.
        public let state: ArchiveState?
        /// A description for the reason that the archive is in the current state.
        public let stateReason: String?

        @inlinable
        public init(archiveName: String? = nil, creationTime: Date? = nil, eventCount: Int64? = nil, eventSourceArn: String? = nil, retentionDays: Int? = nil, sizeBytes: Int64? = nil, state: ArchiveState? = nil, stateReason: String? = nil) {
            self.archiveName = archiveName
            self.creationTime = creationTime
            self.eventCount = eventCount
            self.eventSourceArn = eventSourceArn
            self.retentionDays = retentionDays
            self.sizeBytes = sizeBytes
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case archiveName = "ArchiveName"
            case creationTime = "CreationTime"
            case eventCount = "EventCount"
            case eventSourceArn = "EventSourceArn"
            case retentionDays = "RetentionDays"
            case sizeBytes = "SizeBytes"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct AwsVpcConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE.
        public let assignPublicIp: AssignPublicIp?
        /// Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
        public let securityGroups: [String]?
        /// Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
        public let subnets: [String]

        @inlinable
        public init(assignPublicIp: AssignPublicIp? = nil, securityGroups: [String]? = nil, subnets: [String]) {
            self.assignPublicIp = assignPublicIp
            self.securityGroups = securityGroups
            self.subnets = subnets
        }

        private enum CodingKeys: String, CodingKey {
            case assignPublicIp = "AssignPublicIp"
            case securityGroups = "SecurityGroups"
            case subnets = "Subnets"
        }
    }

    public struct BatchArrayProperties: AWSEncodableShape & AWSDecodableShape {
        /// The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000.
        public let size: Int?

        @inlinable
        public init(size: Int? = nil) {
            self.size = size
        }

        private enum CodingKeys: String, CodingKey {
            case size = "Size"
        }
    }

    public struct BatchParameters: AWSEncodableShape & AWSDecodableShape {
        /// The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.
        public let arrayProperties: BatchArrayProperties?
        /// The ARN or name of the job definition to use if the event target is an Batch job. This job definition must already exist.
        public let jobDefinition: String
        /// The name to use for this execution of the job, if the target is an Batch job.
        public let jobName: String
        /// The retry strategy to use for failed jobs, if the target is an Batch job. The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.
        public let retryStrategy: BatchRetryStrategy?

        @inlinable
        public init(arrayProperties: BatchArrayProperties? = nil, jobDefinition: String, jobName: String, retryStrategy: BatchRetryStrategy? = nil) {
            self.arrayProperties = arrayProperties
            self.jobDefinition = jobDefinition
            self.jobName = jobName
            self.retryStrategy = retryStrategy
        }

        private enum CodingKeys: String, CodingKey {
            case arrayProperties = "ArrayProperties"
            case jobDefinition = "JobDefinition"
            case jobName = "JobName"
            case retryStrategy = "RetryStrategy"
        }
    }

    public struct BatchRetryStrategy: AWSEncodableShape & AWSDecodableShape {
        /// The number of times to attempt to retry, if the job fails. Valid values are 1–10.
        public let attempts: Int?

        @inlinable
        public init(attempts: Int? = nil) {
            self.attempts = attempts
        }

        private enum CodingKeys: String, CodingKey {
            case attempts = "Attempts"
        }
    }

    public struct CancelReplayRequest: AWSEncodableShape {
        /// The name of the replay to cancel.
        public let replayName: String

        @inlinable
        public init(replayName: String) {
            self.replayName = replayName
        }

        public func validate(name: String) throws {
            try self.validate(self.replayName, name: "replayName", parent: name, max: 64)
            try self.validate(self.replayName, name: "replayName", parent: name, min: 1)
            try self.validate(self.replayName, name: "replayName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case replayName = "ReplayName"
        }
    }

    public struct CancelReplayResponse: AWSDecodableShape {
        /// The ARN of the replay to cancel.
        public let replayArn: String?
        /// The current state of the replay.
        public let state: ReplayState?
        /// The reason that the replay is in the current state.
        public let stateReason: String?

        @inlinable
        public init(replayArn: String? = nil, state: ReplayState? = nil, stateReason: String? = nil) {
            self.replayArn = replayArn
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case replayArn = "ReplayArn"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct CapacityProviderStrategyItem: AWSEncodableShape & AWSDecodableShape {
        /// The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.
        public let base: Int?
        /// The short name of the capacity provider.
        public let capacityProvider: String
        /// The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.
        public let weight: Int?

        @inlinable
        public init(base: Int? = nil, capacityProvider: String, weight: Int? = nil) {
            self.base = base
            self.capacityProvider = capacityProvider
            self.weight = weight
        }

        public func validate(name: String) throws {
            try self.validate(self.base, name: "base", parent: name, max: 100000)
            try self.validate(self.base, name: "base", parent: name, min: 0)
            try self.validate(self.capacityProvider, name: "capacityProvider", parent: name, max: 255)
            try self.validate(self.capacityProvider, name: "capacityProvider", parent: name, min: 1)
            try self.validate(self.weight, name: "weight", parent: name, max: 1000)
            try self.validate(self.weight, name: "weight", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case base = "base"
            case capacityProvider = "capacityProvider"
            case weight = "weight"
        }
    }

    public struct Condition: AWSEncodableShape {
        /// Specifies the key for the condition. Currently the only supported key is aws:PrincipalOrgID.
        public let key: String
        /// Specifies the type of condition. Currently the only supported value is StringEquals.
        public let type: String
        /// Specifies the value for the key. Currently, this must be the ID of the organization.
        public let value: String

        @inlinable
        public init(key: String, type: String, value: String) {
            self.key = key
            self.type = type
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case type = "Type"
            case value = "Value"
        }
    }

    public struct Connection: AWSDecodableShape {
        /// The authorization type specified for the connection.  OAUTH tokens are refreshed when a 401 or 407 response is returned.
        public let authorizationType: ConnectionAuthorizationType?
        /// The ARN of the connection.
        public let connectionArn: String?
        /// The state of the connection.
        public let connectionState: ConnectionState?
        /// A time stamp for the time that the connection was created.
        public let creationTime: Date?
        /// A time stamp for the time that the connection was last authorized.
        public let lastAuthorizedTime: Date?
        /// A time stamp for the time that the connection was last modified.
        public let lastModifiedTime: Date?
        /// The name of the connection.
        public let name: String?
        /// The reason that the connection is in the connection state.
        public let stateReason: String?

        @inlinable
        public init(authorizationType: ConnectionAuthorizationType? = nil, connectionArn: String? = nil, connectionState: ConnectionState? = nil, creationTime: Date? = nil, lastAuthorizedTime: Date? = nil, lastModifiedTime: Date? = nil, name: String? = nil, stateReason: String? = nil) {
            self.authorizationType = authorizationType
            self.connectionArn = connectionArn
            self.connectionState = connectionState
            self.creationTime = creationTime
            self.lastAuthorizedTime = lastAuthorizedTime
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationType = "AuthorizationType"
            case connectionArn = "ConnectionArn"
            case connectionState = "ConnectionState"
            case creationTime = "CreationTime"
            case lastAuthorizedTime = "LastAuthorizedTime"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
            case stateReason = "StateReason"
        }
    }

    public struct ConnectionApiKeyAuthResponseParameters: AWSDecodableShape {
        /// The name of the header to use for the APIKeyValue used for authorization.
        public let apiKeyName: String?

        @inlinable
        public init(apiKeyName: String? = nil) {
            self.apiKeyName = apiKeyName
        }

        private enum CodingKeys: String, CodingKey {
            case apiKeyName = "ApiKeyName"
        }
    }

    public struct ConnectionAuthResponseParameters: AWSDecodableShape {
        /// The API Key parameters to use for authorization.
        public let apiKeyAuthParameters: ConnectionApiKeyAuthResponseParameters?
        /// The authorization parameters for Basic authorization.
        public let basicAuthParameters: ConnectionBasicAuthResponseParameters?
        /// For private OAuth authentication endpoints. The parameters EventBridge uses to authenticate against the endpoint. For more information, see Authorization methods for connections in the  Amazon EventBridge User Guide .
        public let connectivityParameters: DescribeConnectionConnectivityParameters?
        /// Additional parameters for the connection that are passed through with every invocation to the HTTP endpoint.
        public let invocationHttpParameters: ConnectionHttpParameters?
        /// The OAuth parameters to use for authorization.
        public let oAuthParameters: ConnectionOAuthResponseParameters?

        @inlinable
        public init(apiKeyAuthParameters: ConnectionApiKeyAuthResponseParameters? = nil, basicAuthParameters: ConnectionBasicAuthResponseParameters? = nil, connectivityParameters: DescribeConnectionConnectivityParameters? = nil, invocationHttpParameters: ConnectionHttpParameters? = nil, oAuthParameters: ConnectionOAuthResponseParameters? = nil) {
            self.apiKeyAuthParameters = apiKeyAuthParameters
            self.basicAuthParameters = basicAuthParameters
            self.connectivityParameters = connectivityParameters
            self.invocationHttpParameters = invocationHttpParameters
            self.oAuthParameters = oAuthParameters
        }

        private enum CodingKeys: String, CodingKey {
            case apiKeyAuthParameters = "ApiKeyAuthParameters"
            case basicAuthParameters = "BasicAuthParameters"
            case connectivityParameters = "ConnectivityParameters"
            case invocationHttpParameters = "InvocationHttpParameters"
            case oAuthParameters = "OAuthParameters"
        }
    }

    public struct ConnectionBasicAuthResponseParameters: AWSDecodableShape {
        /// The user name to use for Basic authorization.
        public let username: String?

        @inlinable
        public init(username: String? = nil) {
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
        }
    }

    public struct ConnectionBodyParameter: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the value is secret.
        public let isValueSecret: Bool?
        /// The key for the parameter.
        public let key: String?
        /// The value associated with the key.
        public let value: String?

        @inlinable
        public init(isValueSecret: Bool? = nil, key: String? = nil, value: String? = nil) {
            self.isValueSecret = isValueSecret
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case isValueSecret = "IsValueSecret"
            case key = "Key"
            case value = "Value"
        }
    }

    public struct ConnectionHeaderParameter: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the value is a secret.
        public let isValueSecret: Bool?
        /// The key for the parameter.
        public let key: String?
        /// The value associated with the key.
        public let value: String?

        @inlinable
        public init(isValueSecret: Bool? = nil, key: String? = nil, value: String? = nil) {
            self.isValueSecret = isValueSecret
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 512)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[!#$%&'*+-.^_`|~0-9a-zA-Z]+$")
            try self.validate(self.value, name: "value", parent: name, max: 512)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[ \\t]*[\\x20-\\x7E]+([ \\t]+[\\x20-\\x7E]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case isValueSecret = "IsValueSecret"
            case key = "Key"
            case value = "Value"
        }
    }

    public struct ConnectionHttpParameters: AWSEncodableShape & AWSDecodableShape {
        /// Any additional body string parameters for the connection.
        public let bodyParameters: [ConnectionBodyParameter]?
        /// Any additional header parameters for the connection.
        public let headerParameters: [ConnectionHeaderParameter]?
        /// Any additional query string parameters for the connection.
        public let queryStringParameters: [ConnectionQueryStringParameter]?

        @inlinable
        public init(bodyParameters: [ConnectionBodyParameter]? = nil, headerParameters: [ConnectionHeaderParameter]? = nil, queryStringParameters: [ConnectionQueryStringParameter]? = nil) {
            self.bodyParameters = bodyParameters
            self.headerParameters = headerParameters
            self.queryStringParameters = queryStringParameters
        }

        public func validate(name: String) throws {
            try self.validate(self.bodyParameters, name: "bodyParameters", parent: name, max: 100)
            try self.headerParameters?.forEach {
                try $0.validate(name: "\(name).headerParameters[]")
            }
            try self.validate(self.headerParameters, name: "headerParameters", parent: name, max: 100)
            try self.queryStringParameters?.forEach {
                try $0.validate(name: "\(name).queryStringParameters[]")
            }
            try self.validate(self.queryStringParameters, name: "queryStringParameters", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case bodyParameters = "BodyParameters"
            case headerParameters = "HeaderParameters"
            case queryStringParameters = "QueryStringParameters"
        }
    }

    public struct ConnectionOAuthClientResponseParameters: AWSDecodableShape {
        /// The client ID associated with the response to the connection request.
        public let clientID: String?

        @inlinable
        public init(clientID: String? = nil) {
            self.clientID = clientID
        }

        private enum CodingKeys: String, CodingKey {
            case clientID = "ClientID"
        }
    }

    public struct ConnectionOAuthResponseParameters: AWSDecodableShape {
        /// The URL to the HTTP endpoint that authorized the request.
        public let authorizationEndpoint: String?
        /// Details about the client parameters returned when OAuth is specified as the authorization type.
        public let clientParameters: ConnectionOAuthClientResponseParameters?
        /// The method used to connect to the HTTP endpoint.
        public let httpMethod: ConnectionOAuthHttpMethod?
        /// The additional HTTP parameters used for the OAuth authorization request.
        public let oAuthHttpParameters: ConnectionHttpParameters?

        @inlinable
        public init(authorizationEndpoint: String? = nil, clientParameters: ConnectionOAuthClientResponseParameters? = nil, httpMethod: ConnectionOAuthHttpMethod? = nil, oAuthHttpParameters: ConnectionHttpParameters? = nil) {
            self.authorizationEndpoint = authorizationEndpoint
            self.clientParameters = clientParameters
            self.httpMethod = httpMethod
            self.oAuthHttpParameters = oAuthHttpParameters
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationEndpoint = "AuthorizationEndpoint"
            case clientParameters = "ClientParameters"
            case httpMethod = "HttpMethod"
            case oAuthHttpParameters = "OAuthHttpParameters"
        }
    }

    public struct ConnectionQueryStringParameter: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the value is secret.
        public let isValueSecret: Bool?
        /// The key for a query string parameter.
        public let key: String?
        /// The value associated with the key for the query string parameter.
        public let value: String?

        @inlinable
        public init(isValueSecret: Bool? = nil, key: String? = nil, value: String? = nil) {
            self.isValueSecret = isValueSecret
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 512)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[^\\x00-\\x1F\\x7F]+$")
            try self.validate(self.value, name: "value", parent: name, max: 512)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[^\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case isValueSecret = "IsValueSecret"
            case key = "Key"
            case value = "Value"
        }
    }

    public struct ConnectivityResourceConfigurationArn: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon VPC Lattice resource configuration for the resource endpoint.
        public let resourceConfigurationArn: String

        @inlinable
        public init(resourceConfigurationArn: String) {
            self.resourceConfigurationArn = resourceConfigurationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceConfigurationArn, name: "resourceConfigurationArn", parent: name, max: 2048)
            try self.validate(self.resourceConfigurationArn, name: "resourceConfigurationArn", parent: name, pattern: "^(?:^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}$|^$)$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceConfigurationArn = "ResourceConfigurationArn"
        }
    }

    public struct ConnectivityResourceParameters: AWSEncodableShape {
        /// The parameters for EventBridge to use when invoking the resource endpoint.
        public let resourceParameters: ConnectivityResourceConfigurationArn

        @inlinable
        public init(resourceParameters: ConnectivityResourceConfigurationArn) {
            self.resourceParameters = resourceParameters
        }

        public func validate(name: String) throws {
            try self.resourceParameters.validate(name: "\(name).resourceParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceParameters = "ResourceParameters"
        }
    }

    public struct CreateApiDestinationRequest: AWSEncodableShape {
        /// The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.
        public let connectionArn: String
        /// A description for the API destination to create.
        public let description: String?
        /// The method to use for the request to the HTTP invocation endpoint.
        public let httpMethod: ApiDestinationHttpMethod
        /// The URL to the HTTP invocation endpoint for the API destination.
        public let invocationEndpoint: String
        /// The maximum number of requests per second to send to the HTTP invocation endpoint.
        public let invocationRateLimitPerSecond: Int?
        /// The name for the API destination to create.
        public let name: String

        @inlinable
        public init(connectionArn: String, description: String? = nil, httpMethod: ApiDestinationHttpMethod, invocationEndpoint: String, invocationRateLimitPerSecond: Int? = nil, name: String) {
            self.connectionArn = connectionArn
            self.description = description
            self.httpMethod = httpMethod
            self.invocationEndpoint = invocationEndpoint
            self.invocationRateLimitPerSecond = invocationRateLimitPerSecond
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, max: 1600)
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, min: 1)
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:connection\\/[\\.\\-_A-Za-z0-9]+\\/[\\-A-Za-z0-9]+$")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.validate(self.invocationEndpoint, name: "invocationEndpoint", parent: name, max: 2048)
            try self.validate(self.invocationEndpoint, name: "invocationEndpoint", parent: name, min: 1)
            try self.validate(self.invocationEndpoint, name: "invocationEndpoint", parent: name, pattern: "^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@\\x26=+$,A-Za-z0-9])+)([).!';/?:,])?$")
            try self.validate(self.invocationRateLimitPerSecond, name: "invocationRateLimitPerSecond", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case description = "Description"
            case httpMethod = "HttpMethod"
            case invocationEndpoint = "InvocationEndpoint"
            case invocationRateLimitPerSecond = "InvocationRateLimitPerSecond"
            case name = "Name"
        }
    }

    public struct CreateApiDestinationResponse: AWSDecodableShape {
        /// The ARN of the API destination that was created by the request.
        public let apiDestinationArn: String?
        /// The state of the API destination that was created by the request.
        public let apiDestinationState: ApiDestinationState?
        /// A time stamp indicating the time that the API destination was created.
        public let creationTime: Date?
        /// A time stamp indicating the time that the API destination was last modified.
        public let lastModifiedTime: Date?

        @inlinable
        public init(apiDestinationArn: String? = nil, apiDestinationState: ApiDestinationState? = nil, creationTime: Date? = nil, lastModifiedTime: Date? = nil) {
            self.apiDestinationArn = apiDestinationArn
            self.apiDestinationState = apiDestinationState
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
        }

        private enum CodingKeys: String, CodingKey {
            case apiDestinationArn = "ApiDestinationArn"
            case apiDestinationState = "ApiDestinationState"
            case creationTime = "CreationTime"
            case lastModifiedTime = "LastModifiedTime"
        }
    }

    public struct CreateArchiveRequest: AWSEncodableShape {
        /// The name for the archive to create.
        public let archiveName: String
        /// A description for the archive.
        public let description: String?
        /// An event pattern to use to filter events sent to the archive.
        public let eventPattern: String?
        /// The ARN of the event bus that sends events to the archive.
        public let eventSourceArn: String
        /// The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key  Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive. For more information, see Identify and view keys in the Key Management Service Developer Guide.   If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a  customer managed key for any archives for the event bus as well.  For more information, see Encrypting archives in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely
        public let retentionDays: Int?

        @inlinable
        public init(archiveName: String, description: String? = nil, eventPattern: String? = nil, eventSourceArn: String, kmsKeyIdentifier: String? = nil, retentionDays: Int? = nil) {
            self.archiveName = archiveName
            self.description = description
            self.eventPattern = eventPattern
            self.eventSourceArn = eventSourceArn
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.retentionDays = retentionDays
        }

        public func validate(name: String) throws {
            try self.validate(self.archiveName, name: "archiveName", parent: name, max: 48)
            try self.validate(self.archiveName, name: "archiveName", parent: name, min: 1)
            try self.validate(self.archiveName, name: "archiveName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.validate(self.eventPattern, name: "eventPattern", parent: name, max: 4096)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, max: 1600)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, min: 1)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:.+\\/.+$")
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, max: 2048)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, pattern: "^[a-zA-Z0-9_\\-/:]*$")
            try self.validate(self.retentionDays, name: "retentionDays", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case archiveName = "ArchiveName"
            case description = "Description"
            case eventPattern = "EventPattern"
            case eventSourceArn = "EventSourceArn"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case retentionDays = "RetentionDays"
        }
    }

    public struct CreateArchiveResponse: AWSDecodableShape {
        /// The ARN of the archive that was created.
        public let archiveArn: String?
        /// The time at which the archive was created.
        public let creationTime: Date?
        /// The state of the archive that was created.
        public let state: ArchiveState?
        /// The reason that the archive is in the state.
        public let stateReason: String?

        @inlinable
        public init(archiveArn: String? = nil, creationTime: Date? = nil, state: ArchiveState? = nil, stateReason: String? = nil) {
            self.archiveArn = archiveArn
            self.creationTime = creationTime
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case archiveArn = "ArchiveArn"
            case creationTime = "CreationTime"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct CreateConnectionApiKeyAuthRequestParameters: AWSEncodableShape {
        /// The name of the API key to use for authorization.
        public let apiKeyName: String
        /// The value for the API key to use for authorization.
        public let apiKeyValue: String

        @inlinable
        public init(apiKeyName: String, apiKeyValue: String) {
            self.apiKeyName = apiKeyName
            self.apiKeyValue = apiKeyValue
        }

        public func validate(name: String) throws {
            try self.validate(self.apiKeyName, name: "apiKeyName", parent: name, max: 512)
            try self.validate(self.apiKeyName, name: "apiKeyName", parent: name, min: 1)
            try self.validate(self.apiKeyName, name: "apiKeyName", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
            try self.validate(self.apiKeyValue, name: "apiKeyValue", parent: name, max: 512)
            try self.validate(self.apiKeyValue, name: "apiKeyValue", parent: name, min: 1)
            try self.validate(self.apiKeyValue, name: "apiKeyValue", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case apiKeyName = "ApiKeyName"
            case apiKeyValue = "ApiKeyValue"
        }
    }

    public struct CreateConnectionAuthRequestParameters: AWSEncodableShape {
        /// The API key authorization parameters to use for the connection.
        public let apiKeyAuthParameters: CreateConnectionApiKeyAuthRequestParameters?
        /// The Basic authorization parameters to use for the connection.
        public let basicAuthParameters: CreateConnectionBasicAuthRequestParameters?
        /// If you specify a private OAuth endpoint, the parameters for EventBridge to use when authenticating against the endpoint. For more information, see Authorization methods for connections in the  Amazon EventBridge User Guide .
        public let connectivityParameters: ConnectivityResourceParameters?
        /// The API key authorization parameters to use for the connection. Note that if you include additional parameters for the target of a rule via HttpParameters, including query strings, the parameters added for the connection take precedence.
        public let invocationHttpParameters: ConnectionHttpParameters?
        /// The OAuth authorization parameters to use for the connection.
        public let oAuthParameters: CreateConnectionOAuthRequestParameters?

        @inlinable
        public init(apiKeyAuthParameters: CreateConnectionApiKeyAuthRequestParameters? = nil, basicAuthParameters: CreateConnectionBasicAuthRequestParameters? = nil, connectivityParameters: ConnectivityResourceParameters? = nil, invocationHttpParameters: ConnectionHttpParameters? = nil, oAuthParameters: CreateConnectionOAuthRequestParameters? = nil) {
            self.apiKeyAuthParameters = apiKeyAuthParameters
            self.basicAuthParameters = basicAuthParameters
            self.connectivityParameters = connectivityParameters
            self.invocationHttpParameters = invocationHttpParameters
            self.oAuthParameters = oAuthParameters
        }

        public func validate(name: String) throws {
            try self.apiKeyAuthParameters?.validate(name: "\(name).apiKeyAuthParameters")
            try self.basicAuthParameters?.validate(name: "\(name).basicAuthParameters")
            try self.connectivityParameters?.validate(name: "\(name).connectivityParameters")
            try self.invocationHttpParameters?.validate(name: "\(name).invocationHttpParameters")
            try self.oAuthParameters?.validate(name: "\(name).oAuthParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case apiKeyAuthParameters = "ApiKeyAuthParameters"
            case basicAuthParameters = "BasicAuthParameters"
            case connectivityParameters = "ConnectivityParameters"
            case invocationHttpParameters = "InvocationHttpParameters"
            case oAuthParameters = "OAuthParameters"
        }
    }

    public struct CreateConnectionBasicAuthRequestParameters: AWSEncodableShape {
        /// The password associated with the user name to use for Basic authorization.
        public let password: String
        /// The user name to use for Basic authorization.
        public let username: String

        @inlinable
        public init(password: String, username: String) {
            self.password = password
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.password, name: "password", parent: name, max: 512)
            try self.validate(self.password, name: "password", parent: name, min: 1)
            try self.validate(self.password, name: "password", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
            try self.validate(self.username, name: "username", parent: name, max: 512)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case password = "Password"
            case username = "Username"
        }
    }

    public struct CreateConnectionOAuthClientRequestParameters: AWSEncodableShape {
        /// The client ID to use for OAuth authorization for the connection.
        public let clientID: String
        /// The client secret associated with the client ID to use for OAuth authorization for the connection.
        public let clientSecret: String

        @inlinable
        public init(clientID: String, clientSecret: String) {
            self.clientID = clientID
            self.clientSecret = clientSecret
        }

        public func validate(name: String) throws {
            try self.validate(self.clientID, name: "clientID", parent: name, max: 512)
            try self.validate(self.clientID, name: "clientID", parent: name, min: 1)
            try self.validate(self.clientID, name: "clientID", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, max: 512)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, min: 1)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientID = "ClientID"
            case clientSecret = "ClientSecret"
        }
    }

    public struct CreateConnectionOAuthRequestParameters: AWSEncodableShape {
        /// The URL to the authorization endpoint when OAuth is specified as the authorization type.
        public let authorizationEndpoint: String
        /// The client parameters for OAuth authorization.
        public let clientParameters: CreateConnectionOAuthClientRequestParameters
        /// The method to use for the authorization request.
        public let httpMethod: ConnectionOAuthHttpMethod
        /// Details about the additional parameters to use for the connection.
        public let oAuthHttpParameters: ConnectionHttpParameters?

        @inlinable
        public init(authorizationEndpoint: String, clientParameters: CreateConnectionOAuthClientRequestParameters, httpMethod: ConnectionOAuthHttpMethod, oAuthHttpParameters: ConnectionHttpParameters? = nil) {
            self.authorizationEndpoint = authorizationEndpoint
            self.clientParameters = clientParameters
            self.httpMethod = httpMethod
            self.oAuthHttpParameters = oAuthHttpParameters
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizationEndpoint, name: "authorizationEndpoint", parent: name, max: 2048)
            try self.validate(self.authorizationEndpoint, name: "authorizationEndpoint", parent: name, min: 1)
            try self.validate(self.authorizationEndpoint, name: "authorizationEndpoint", parent: name, pattern: "^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@\\x26=+$,A-Za-z0-9])+)([).!';/?:,])?$")
            try self.clientParameters.validate(name: "\(name).clientParameters")
            try self.oAuthHttpParameters?.validate(name: "\(name).oAuthHttpParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationEndpoint = "AuthorizationEndpoint"
            case clientParameters = "ClientParameters"
            case httpMethod = "HttpMethod"
            case oAuthHttpParameters = "OAuthHttpParameters"
        }
    }

    public struct CreateConnectionRequest: AWSEncodableShape {
        /// The type of authorization to use for the connection.  OAUTH tokens are refreshed when a 401 or 407 response is returned.
        public let authorizationType: ConnectionAuthorizationType
        /// The authorization parameters to use to authorize with the endpoint.  You must include only authorization parameters for the AuthorizationType you specify.
        public let authParameters: CreateConnectionAuthRequestParameters
        /// A description for the connection to create.
        public let description: String?
        /// For connections to private APIs, the parameters to use for invoking the API. For more information, see Connecting to private APIs in the  Amazon EventBridge User Guide .
        public let invocationConnectivityParameters: ConnectivityResourceParameters?
        /// The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key  Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection. For more information, see Identify and view keys in the Key Management Service Developer Guide.
        public let kmsKeyIdentifier: String?
        /// The name for the connection to create.
        public let name: String

        @inlinable
        public init(authorizationType: ConnectionAuthorizationType, authParameters: CreateConnectionAuthRequestParameters, description: String? = nil, invocationConnectivityParameters: ConnectivityResourceParameters? = nil, kmsKeyIdentifier: String? = nil, name: String) {
            self.authorizationType = authorizationType
            self.authParameters = authParameters
            self.description = description
            self.invocationConnectivityParameters = invocationConnectivityParameters
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.name = name
        }

        public func validate(name: String) throws {
            try self.authParameters.validate(name: "\(name).authParameters")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.invocationConnectivityParameters?.validate(name: "\(name).invocationConnectivityParameters")
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, max: 2048)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, pattern: "^[a-zA-Z0-9_\\-/:]*$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationType = "AuthorizationType"
            case authParameters = "AuthParameters"
            case description = "Description"
            case invocationConnectivityParameters = "InvocationConnectivityParameters"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case name = "Name"
        }
    }

    public struct CreateConnectionResponse: AWSDecodableShape {
        /// The ARN of the connection that was created by the request.
        public let connectionArn: String?
        /// The state of the connection that was created by the request.
        public let connectionState: ConnectionState?
        /// A time stamp for the time that the connection was created.
        public let creationTime: Date?
        /// A time stamp for the time that the connection was last updated.
        public let lastModifiedTime: Date?

        @inlinable
        public init(connectionArn: String? = nil, connectionState: ConnectionState? = nil, creationTime: Date? = nil, lastModifiedTime: Date? = nil) {
            self.connectionArn = connectionArn
            self.connectionState = connectionState
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case connectionState = "ConnectionState"
            case creationTime = "CreationTime"
            case lastModifiedTime = "LastModifiedTime"
        }
    }

    public struct CreateEndpointRequest: AWSEncodableShape {
        /// A description of the global endpoint.
        public let description: String?
        /// Define the event buses used.   The names of the event buses must be identical in each Region.
        public let eventBuses: [EndpointEventBus]
        /// The name of the global endpoint. For example, "Name":"us-east-2-custom_bus_A-endpoint".
        public let name: String
        /// Enable or disable event replication. The default state is ENABLED which means you must supply a RoleArn. If you don't have a RoleArn or you don't want event replication enabled, set the state to DISABLED.
        public let replicationConfig: ReplicationConfig?
        /// The ARN of the role used for replication.
        public let roleArn: String?
        /// Configure the routing policy, including the health check and secondary Region..
        public let routingConfig: RoutingConfig

        @inlinable
        public init(description: String? = nil, eventBuses: [EndpointEventBus], name: String, replicationConfig: ReplicationConfig? = nil, roleArn: String? = nil, routingConfig: RoutingConfig) {
            self.description = description
            self.eventBuses = eventBuses
            self.name = name
            self.replicationConfig = replicationConfig
            self.roleArn = roleArn
            self.routingConfig = routingConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.eventBuses.forEach {
                try $0.validate(name: "\(name).eventBuses[]")
            }
            try self.validate(self.eventBuses, name: "eventBuses", parent: name, max: 2)
            try self.validate(self.eventBuses, name: "eventBuses", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 256)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws[a-z-]*:iam::\\d{12}:role\\/[\\w+=,.@/-]+$")
            try self.routingConfig.validate(name: "\(name).routingConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case eventBuses = "EventBuses"
            case name = "Name"
            case replicationConfig = "ReplicationConfig"
            case roleArn = "RoleArn"
            case routingConfig = "RoutingConfig"
        }
    }

    public struct CreateEndpointResponse: AWSDecodableShape {
        /// The ARN of the endpoint that was created by this request.
        public let arn: String?
        /// The event buses used by this request.
        public let eventBuses: [EndpointEventBus]?
        /// The name of the endpoint that was created by this request.
        public let name: String?
        /// Whether event replication was enabled or disabled by this request.
        public let replicationConfig: ReplicationConfig?
        /// The ARN of the role used by event replication for this request.
        public let roleArn: String?
        /// The routing configuration defined by this request.
        public let routingConfig: RoutingConfig?
        /// The state of the endpoint that was created by this request.
        public let state: EndpointState?

        @inlinable
        public init(arn: String? = nil, eventBuses: [EndpointEventBus]? = nil, name: String? = nil, replicationConfig: ReplicationConfig? = nil, roleArn: String? = nil, routingConfig: RoutingConfig? = nil, state: EndpointState? = nil) {
            self.arn = arn
            self.eventBuses = eventBuses
            self.name = name
            self.replicationConfig = replicationConfig
            self.roleArn = roleArn
            self.routingConfig = routingConfig
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case eventBuses = "EventBuses"
            case name = "Name"
            case replicationConfig = "ReplicationConfig"
            case roleArn = "RoleArn"
            case routingConfig = "RoutingConfig"
            case state = "State"
        }
    }

    public struct CreateEventBusRequest: AWSEncodableShape {
        public let deadLetterConfig: DeadLetterConfig?
        /// The event bus description.
        public let description: String?
        /// If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
        public let eventSourceName: String?
        /// The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key  Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus. For more information, see Identify and view keys in the Key Management Service Developer Guide.   Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:    You call  CreateDiscoverer on an event bus set to use a customer managed key for encryption.   You call  UpdatedEventBus to set a customer managed key on an event bus with schema discovery enabled.   To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Encrypting events in the Amazon EventBridge User Guide.   If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a  customer managed key for any archives for the event bus as well.  For more information, see Encrypting archives in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
        public let logConfig: LogConfig?
        /// The name of the new event bus.  Custom event bus names can't contain the / character, but you can use the / character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to. You can't use the name default for a custom event bus, as this name is already used for your account's default event bus.
        public let name: String
        /// Tags to associate with the event bus.
        public let tags: [Tag]?

        @inlinable
        public init(deadLetterConfig: DeadLetterConfig? = nil, description: String? = nil, eventSourceName: String? = nil, kmsKeyIdentifier: String? = nil, logConfig: LogConfig? = nil, name: String, tags: [Tag]? = nil) {
            self.deadLetterConfig = deadLetterConfig
            self.description = description
            self.eventSourceName = eventSourceName
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.logConfig = logConfig
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.deadLetterConfig?.validate(name: "\(name).deadLetterConfig")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.eventSourceName, name: "eventSourceName", parent: name, max: 256)
            try self.validate(self.eventSourceName, name: "eventSourceName", parent: name, min: 1)
            try self.validate(self.eventSourceName, name: "eventSourceName", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, max: 2048)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, pattern: "^[a-zA-Z0-9_\\-/:]*$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[/\\.\\-_A-Za-z0-9]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case deadLetterConfig = "DeadLetterConfig"
            case description = "Description"
            case eventSourceName = "EventSourceName"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case logConfig = "LogConfig"
            case name = "Name"
            case tags = "Tags"
        }
    }

    public struct CreateEventBusResponse: AWSDecodableShape {
        public let deadLetterConfig: DeadLetterConfig?
        /// The event bus description.
        public let description: String?
        /// The ARN of the new event bus.
        public let eventBusArn: String?
        /// The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
        public let logConfig: LogConfig?

        @inlinable
        public init(deadLetterConfig: DeadLetterConfig? = nil, description: String? = nil, eventBusArn: String? = nil, kmsKeyIdentifier: String? = nil, logConfig: LogConfig? = nil) {
            self.deadLetterConfig = deadLetterConfig
            self.description = description
            self.eventBusArn = eventBusArn
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.logConfig = logConfig
        }

        private enum CodingKeys: String, CodingKey {
            case deadLetterConfig = "DeadLetterConfig"
            case description = "Description"
            case eventBusArn = "EventBusArn"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case logConfig = "LogConfig"
        }
    }

    public struct CreatePartnerEventSourceRequest: AWSEncodableShape {
        /// The Amazon Web Services account ID that is permitted to create a matching partner event bus for this partner event source.
        public let account: String
        /// The name of the partner event source. This name must be unique and must be in the format  partner_name/event_namespace/event_name . The Amazon Web Services account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.
        public let name: String

        @inlinable
        public init(account: String, name: String) {
            self.account = account
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.account, name: "account", parent: name, max: 12)
            try self.validate(self.account, name: "account", parent: name, min: 12)
            try self.validate(self.account, name: "account", parent: name, pattern: "^\\d{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case account = "Account"
            case name = "Name"
        }
    }

    public struct CreatePartnerEventSourceResponse: AWSDecodableShape {
        /// The ARN of the partner event source.
        public let eventSourceArn: String?

        @inlinable
        public init(eventSourceArn: String? = nil) {
            self.eventSourceArn = eventSourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case eventSourceArn = "EventSourceArn"
        }
    }

    public struct DeactivateEventSourceRequest: AWSEncodableShape {
        /// The name of the partner event source to deactivate.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeadLetterConfig: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the SQS queue specified as the target for the dead-letter queue.
        public let arn: String?

        @inlinable
        public init(arn: String? = nil) {
            self.arn = arn
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 1600)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct DeauthorizeConnectionRequest: AWSEncodableShape {
        /// The name of the connection to remove authorization from.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeauthorizeConnectionResponse: AWSDecodableShape {
        /// The ARN of the connection that authorization was removed from.
        public let connectionArn: String?
        /// The state of the connection.
        public let connectionState: ConnectionState?
        /// A time stamp for the time that the connection was created.
        public let creationTime: Date?
        /// A time stamp for the time that the connection was last authorized.
        public let lastAuthorizedTime: Date?
        /// A time stamp for the time that the connection was last updated.
        public let lastModifiedTime: Date?

        @inlinable
        public init(connectionArn: String? = nil, connectionState: ConnectionState? = nil, creationTime: Date? = nil, lastAuthorizedTime: Date? = nil, lastModifiedTime: Date? = nil) {
            self.connectionArn = connectionArn
            self.connectionState = connectionState
            self.creationTime = creationTime
            self.lastAuthorizedTime = lastAuthorizedTime
            self.lastModifiedTime = lastModifiedTime
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case connectionState = "ConnectionState"
            case creationTime = "CreationTime"
            case lastAuthorizedTime = "LastAuthorizedTime"
            case lastModifiedTime = "LastModifiedTime"
        }
    }

    public struct DeleteApiDestinationRequest: AWSEncodableShape {
        /// The name of the destination to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteApiDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteArchiveRequest: AWSEncodableShape {
        /// The name of the archive to delete.
        public let archiveName: String

        @inlinable
        public init(archiveName: String) {
            self.archiveName = archiveName
        }

        public func validate(name: String) throws {
            try self.validate(self.archiveName, name: "archiveName", parent: name, max: 48)
            try self.validate(self.archiveName, name: "archiveName", parent: name, min: 1)
            try self.validate(self.archiveName, name: "archiveName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case archiveName = "ArchiveName"
        }
    }

    public struct DeleteArchiveResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteConnectionRequest: AWSEncodableShape {
        /// The name of the connection to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteConnectionResponse: AWSDecodableShape {
        /// The ARN of the connection that was deleted.
        public let connectionArn: String?
        /// The state of the connection before it was deleted.
        public let connectionState: ConnectionState?
        /// A time stamp for the time that the connection was created.
        public let creationTime: Date?
        /// A time stamp for the time that the connection was last authorized before it wa deleted.
        public let lastAuthorizedTime: Date?
        /// A time stamp for the time that the connection was last modified before it was deleted.
        public let lastModifiedTime: Date?

        @inlinable
        public init(connectionArn: String? = nil, connectionState: ConnectionState? = nil, creationTime: Date? = nil, lastAuthorizedTime: Date? = nil, lastModifiedTime: Date? = nil) {
            self.connectionArn = connectionArn
            self.connectionState = connectionState
            self.creationTime = creationTime
            self.lastAuthorizedTime = lastAuthorizedTime
            self.lastModifiedTime = lastModifiedTime
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case connectionState = "ConnectionState"
            case creationTime = "CreationTime"
            case lastAuthorizedTime = "LastAuthorizedTime"
            case lastModifiedTime = "LastModifiedTime"
        }
    }

    public struct DeleteEndpointRequest: AWSEncodableShape {
        /// The name of the endpoint you want to delete. For example, "Name":"us-east-2-custom_bus_A-endpoint"..
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteEndpointResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteEventBusRequest: AWSEncodableShape {
        /// The name of the event bus to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[/\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeletePartnerEventSourceRequest: AWSEncodableShape {
        /// The Amazon Web Services account ID of the Amazon Web Services customer that the event source was created for.
        public let account: String
        /// The name of the event source to delete.
        public let name: String

        @inlinable
        public init(account: String, name: String) {
            self.account = account
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.account, name: "account", parent: name, max: 12)
            try self.validate(self.account, name: "account", parent: name, min: 12)
            try self.validate(self.account, name: "account", parent: name, pattern: "^\\d{12}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case account = "Account"
            case name = "Name"
        }
    }

    public struct DeleteRuleRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.
        public let force: Bool?
        /// The name of the rule.
        public let name: String

        @inlinable
        public init(eventBusName: String? = nil, force: Bool? = nil, name: String) {
            self.eventBusName = eventBusName
            self.force = force
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case force = "Force"
            case name = "Name"
        }
    }

    public struct DescribeApiDestinationRequest: AWSEncodableShape {
        /// The name of the API destination to retrieve.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribeApiDestinationResponse: AWSDecodableShape {
        /// The ARN of the API destination retrieved.
        public let apiDestinationArn: String?
        /// The state of the API destination retrieved.
        public let apiDestinationState: ApiDestinationState?
        /// The ARN of the connection specified for the API destination retrieved.
        public let connectionArn: String?
        /// A time stamp for the time that the API destination was created.
        public let creationTime: Date?
        /// The description for the API destination retrieved.
        public let description: String?
        /// The method to use to connect to the HTTP endpoint.
        public let httpMethod: ApiDestinationHttpMethod?
        /// The URL to use to connect to the HTTP endpoint.
        public let invocationEndpoint: String?
        /// The maximum number of invocations per second to specified for the API destination. Note that if you set the invocation rate maximum to a value lower the rate necessary to send all events received on to the destination HTTP endpoint, some events may not be delivered within the 24-hour retry window. If you plan to set the rate lower than the rate necessary to deliver all events, consider using a dead-letter queue to catch events that are not delivered within 24 hours.
        public let invocationRateLimitPerSecond: Int?
        /// A time stamp for the time that the API destination was last modified.
        public let lastModifiedTime: Date?
        /// The name of the API destination retrieved.
        public let name: String?

        @inlinable
        public init(apiDestinationArn: String? = nil, apiDestinationState: ApiDestinationState? = nil, connectionArn: String? = nil, creationTime: Date? = nil, description: String? = nil, httpMethod: ApiDestinationHttpMethod? = nil, invocationEndpoint: String? = nil, invocationRateLimitPerSecond: Int? = nil, lastModifiedTime: Date? = nil, name: String? = nil) {
            self.apiDestinationArn = apiDestinationArn
            self.apiDestinationState = apiDestinationState
            self.connectionArn = connectionArn
            self.creationTime = creationTime
            self.description = description
            self.httpMethod = httpMethod
            self.invocationEndpoint = invocationEndpoint
            self.invocationRateLimitPerSecond = invocationRateLimitPerSecond
            self.lastModifiedTime = lastModifiedTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case apiDestinationArn = "ApiDestinationArn"
            case apiDestinationState = "ApiDestinationState"
            case connectionArn = "ConnectionArn"
            case creationTime = "CreationTime"
            case description = "Description"
            case httpMethod = "HttpMethod"
            case invocationEndpoint = "InvocationEndpoint"
            case invocationRateLimitPerSecond = "InvocationRateLimitPerSecond"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
        }
    }

    public struct DescribeArchiveRequest: AWSEncodableShape {
        /// The name of the archive to retrieve.
        public let archiveName: String

        @inlinable
        public init(archiveName: String) {
            self.archiveName = archiveName
        }

        public func validate(name: String) throws {
            try self.validate(self.archiveName, name: "archiveName", parent: name, max: 48)
            try self.validate(self.archiveName, name: "archiveName", parent: name, min: 1)
            try self.validate(self.archiveName, name: "archiveName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case archiveName = "ArchiveName"
        }
    }

    public struct DescribeArchiveResponse: AWSDecodableShape {
        /// The ARN of the archive.
        public let archiveArn: String?
        /// The name of the archive.
        public let archiveName: String?
        /// The time at which the archive was created.
        public let creationTime: Date?
        /// The description of the archive.
        public let description: String?
        /// The number of events in the archive.
        public let eventCount: Int64?
        /// The event pattern used to filter events sent to the archive.
        public let eventPattern: String?
        /// The ARN of the event source associated with the archive.
        public let eventSourceArn: String?
        /// The identifier of the KMS customer managed key for EventBridge to use to encrypt this archive, if one has been specified. For more information, see Encrypting archives in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The number of days to retain events for in the archive.
        public let retentionDays: Int?
        /// The size of the archive in bytes.
        public let sizeBytes: Int64?
        /// The state of the archive.
        public let state: ArchiveState?
        /// The reason that the archive is in the state.
        public let stateReason: String?

        @inlinable
        public init(archiveArn: String? = nil, archiveName: String? = nil, creationTime: Date? = nil, description: String? = nil, eventCount: Int64? = nil, eventPattern: String? = nil, eventSourceArn: String? = nil, kmsKeyIdentifier: String? = nil, retentionDays: Int? = nil, sizeBytes: Int64? = nil, state: ArchiveState? = nil, stateReason: String? = nil) {
            self.archiveArn = archiveArn
            self.archiveName = archiveName
            self.creationTime = creationTime
            self.description = description
            self.eventCount = eventCount
            self.eventPattern = eventPattern
            self.eventSourceArn = eventSourceArn
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.retentionDays = retentionDays
            self.sizeBytes = sizeBytes
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case archiveArn = "ArchiveArn"
            case archiveName = "ArchiveName"
            case creationTime = "CreationTime"
            case description = "Description"
            case eventCount = "EventCount"
            case eventPattern = "EventPattern"
            case eventSourceArn = "EventSourceArn"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case retentionDays = "RetentionDays"
            case sizeBytes = "SizeBytes"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct DescribeConnectionConnectivityParameters: AWSDecodableShape {
        /// The parameters for EventBridge to use when invoking the resource endpoint.
        public let resourceParameters: DescribeConnectionResourceParameters

        @inlinable
        public init(resourceParameters: DescribeConnectionResourceParameters) {
            self.resourceParameters = resourceParameters
        }

        private enum CodingKeys: String, CodingKey {
            case resourceParameters = "ResourceParameters"
        }
    }

    public struct DescribeConnectionRequest: AWSEncodableShape {
        /// The name of the connection to retrieve.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribeConnectionResourceParameters: AWSDecodableShape {
        /// For connections to private APIs, the Amazon Resource Name (ARN) of the resource association EventBridge created between the connection and the private API's resource configuration. For more information, see  Managing service network resource associations for connections in the  Amazon EventBridge User Guide .
        public let resourceAssociationArn: String
        /// The Amazon Resource Name (ARN) of the resource configuration for the private API.
        public let resourceConfigurationArn: String

        @inlinable
        public init(resourceAssociationArn: String, resourceConfigurationArn: String) {
            self.resourceAssociationArn = resourceAssociationArn
            self.resourceConfigurationArn = resourceConfigurationArn
        }

        private enum CodingKeys: String, CodingKey {
            case resourceAssociationArn = "ResourceAssociationArn"
            case resourceConfigurationArn = "ResourceConfigurationArn"
        }
    }

    public struct DescribeConnectionResponse: AWSDecodableShape {
        /// The type of authorization specified for the connection.
        public let authorizationType: ConnectionAuthorizationType?
        /// The parameters to use for authorization for the connection.
        public let authParameters: ConnectionAuthResponseParameters?
        /// The ARN of the connection retrieved.
        public let connectionArn: String?
        /// The state of the connection retrieved.
        public let connectionState: ConnectionState?
        /// A time stamp for the time that the connection was created.
        public let creationTime: Date?
        /// The description for the connection retrieved.
        public let description: String?
        /// For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint. For more information, see Connecting to private APIs in the  Amazon EventBridge User Guide .
        public let invocationConnectivityParameters: DescribeConnectionConnectivityParameters?
        /// The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified. For more information, see Encrypting connections in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// A time stamp for the time that the connection was last authorized.
        public let lastAuthorizedTime: Date?
        /// A time stamp for the time that the connection was last modified.
        public let lastModifiedTime: Date?
        /// The name of the connection retrieved.
        public let name: String?
        /// The ARN of the secret created from the authorization parameters specified for the connection.
        public let secretArn: String?
        /// The reason that the connection is in the current connection state.
        public let stateReason: String?

        @inlinable
        public init(authorizationType: ConnectionAuthorizationType? = nil, authParameters: ConnectionAuthResponseParameters? = nil, connectionArn: String? = nil, connectionState: ConnectionState? = nil, creationTime: Date? = nil, description: String? = nil, invocationConnectivityParameters: DescribeConnectionConnectivityParameters? = nil, kmsKeyIdentifier: String? = nil, lastAuthorizedTime: Date? = nil, lastModifiedTime: Date? = nil, name: String? = nil, secretArn: String? = nil, stateReason: String? = nil) {
            self.authorizationType = authorizationType
            self.authParameters = authParameters
            self.connectionArn = connectionArn
            self.connectionState = connectionState
            self.creationTime = creationTime
            self.description = description
            self.invocationConnectivityParameters = invocationConnectivityParameters
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.lastAuthorizedTime = lastAuthorizedTime
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.secretArn = secretArn
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationType = "AuthorizationType"
            case authParameters = "AuthParameters"
            case connectionArn = "ConnectionArn"
            case connectionState = "ConnectionState"
            case creationTime = "CreationTime"
            case description = "Description"
            case invocationConnectivityParameters = "InvocationConnectivityParameters"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case lastAuthorizedTime = "LastAuthorizedTime"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
            case secretArn = "SecretArn"
            case stateReason = "StateReason"
        }
    }

    public struct DescribeEndpointRequest: AWSEncodableShape {
        /// The primary Region of the endpoint you want to get information about. For example "HomeRegion": "us-east-1".
        public let homeRegion: String?
        /// The name of the endpoint you want to get information about. For example, "Name":"us-east-2-custom_bus_A-endpoint".
        public let name: String

        @inlinable
        public init(homeRegion: String? = nil, name: String) {
            self.homeRegion = homeRegion
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.homeRegion, name: "homeRegion", parent: name, max: 20)
            try self.validate(self.homeRegion, name: "homeRegion", parent: name, min: 9)
            try self.validate(self.homeRegion, name: "homeRegion", parent: name, pattern: "^[\\-a-z0-9]+$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case homeRegion = "HomeRegion"
            case name = "Name"
        }
    }

    public struct DescribeEndpointResponse: AWSDecodableShape {
        /// The ARN of the endpoint you asked for information about.
        public let arn: String?
        /// The time the endpoint you asked for information about was created.
        public let creationTime: Date?
        /// The description of the endpoint you asked for information about.
        public let description: String?
        /// The ID of the endpoint you asked for information about.
        public let endpointId: String?
        /// The URL of the endpoint you asked for information about.
        public let endpointUrl: String?
        /// The event buses being used by the endpoint you asked for information about.
        public let eventBuses: [EndpointEventBus]?
        /// The last time the endpoint you asked for information about was modified.
        public let lastModifiedTime: Date?
        /// The name of the endpoint you asked for information about.
        public let name: String?
        /// Whether replication is enabled or disabled for the endpoint you asked for information about.
        public let replicationConfig: ReplicationConfig?
        /// The ARN of the role used by the endpoint you asked for information about.
        public let roleArn: String?
        /// The routing configuration of the endpoint you asked for information about.
        public let routingConfig: RoutingConfig?
        /// The current state of the endpoint you asked for information about.
        public let state: EndpointState?
        /// The reason the endpoint you asked for information about is in its current state.
        public let stateReason: String?

        @inlinable
        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, endpointId: String? = nil, endpointUrl: String? = nil, eventBuses: [EndpointEventBus]? = nil, lastModifiedTime: Date? = nil, name: String? = nil, replicationConfig: ReplicationConfig? = nil, roleArn: String? = nil, routingConfig: RoutingConfig? = nil, state: EndpointState? = nil, stateReason: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.endpointId = endpointId
            self.endpointUrl = endpointUrl
            self.eventBuses = eventBuses
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.replicationConfig = replicationConfig
            self.roleArn = roleArn
            self.routingConfig = routingConfig
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case creationTime = "CreationTime"
            case description = "Description"
            case endpointId = "EndpointId"
            case endpointUrl = "EndpointUrl"
            case eventBuses = "EventBuses"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
            case replicationConfig = "ReplicationConfig"
            case roleArn = "RoleArn"
            case routingConfig = "RoutingConfig"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct DescribeEventBusRequest: AWSEncodableShape {
        /// The name or ARN of the event bus to show details for. If you omit this, the default event bus is displayed.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 1600)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribeEventBusResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the account permitted to write events to the current account.
        public let arn: String?
        /// The time the event bus was created.
        public let creationTime: Date?
        public let deadLetterConfig: DeadLetterConfig?
        /// The event bus description.
        public let description: String?
        /// The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The time the event bus was last modified.
        public let lastModifiedTime: Date?
        /// The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
        public let logConfig: LogConfig?
        /// The name of the event bus. Currently, this is always default.
        public let name: String?
        /// The policy that enables the external account to send events to your account.
        public let policy: String?

        @inlinable
        public init(arn: String? = nil, creationTime: Date? = nil, deadLetterConfig: DeadLetterConfig? = nil, description: String? = nil, kmsKeyIdentifier: String? = nil, lastModifiedTime: Date? = nil, logConfig: LogConfig? = nil, name: String? = nil, policy: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.deadLetterConfig = deadLetterConfig
            self.description = description
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.lastModifiedTime = lastModifiedTime
            self.logConfig = logConfig
            self.name = name
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case creationTime = "CreationTime"
            case deadLetterConfig = "DeadLetterConfig"
            case description = "Description"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case lastModifiedTime = "LastModifiedTime"
            case logConfig = "LogConfig"
            case name = "Name"
            case policy = "Policy"
        }
    }

    public struct DescribeEventSourceRequest: AWSEncodableShape {
        /// The name of the partner event source to display the details of.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribeEventSourceResponse: AWSDecodableShape {
        /// The ARN of the partner event source.
        public let arn: String?
        /// The name of the SaaS partner that created the event source.
        public let createdBy: String?
        /// The date and time that the event source was created.
        public let creationTime: Date?
        /// The date and time that the event source will expire if you do not create a matching event bus.
        public let expirationTime: Date?
        /// The name of the partner event source.
        public let name: String?
        /// The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
        public let state: EventSourceState?

        @inlinable
        public init(arn: String? = nil, createdBy: String? = nil, creationTime: Date? = nil, expirationTime: Date? = nil, name: String? = nil, state: EventSourceState? = nil) {
            self.arn = arn
            self.createdBy = createdBy
            self.creationTime = creationTime
            self.expirationTime = expirationTime
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdBy = "CreatedBy"
            case creationTime = "CreationTime"
            case expirationTime = "ExpirationTime"
            case name = "Name"
            case state = "State"
        }
    }

    public struct DescribePartnerEventSourceRequest: AWSEncodableShape {
        /// The name of the event source to display.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribePartnerEventSourceResponse: AWSDecodableShape {
        /// The ARN of the event source.
        public let arn: String?
        /// The name of the event source.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, name: String? = nil) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case name = "Name"
        }
    }

    public struct DescribeReplayRequest: AWSEncodableShape {
        /// The name of the replay to retrieve.
        public let replayName: String

        @inlinable
        public init(replayName: String) {
            self.replayName = replayName
        }

        public func validate(name: String) throws {
            try self.validate(self.replayName, name: "replayName", parent: name, max: 64)
            try self.validate(self.replayName, name: "replayName", parent: name, min: 1)
            try self.validate(self.replayName, name: "replayName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case replayName = "ReplayName"
        }
    }

    public struct DescribeReplayResponse: AWSDecodableShape {
        /// The description of the replay.
        public let description: String?
        /// A ReplayDestination object that contains details about the replay.
        public let destination: ReplayDestination?
        /// The time stamp for the last event that was replayed from the archive.
        public let eventEndTime: Date?
        /// The time that the event was last replayed.
        public let eventLastReplayedTime: Date?
        /// The ARN of the archive events were replayed from.
        public let eventSourceArn: String?
        /// The time stamp of the first event that was last replayed from the archive.
        public let eventStartTime: Date?
        /// The ARN of the replay.
        public let replayArn: String?
        /// A time stamp for the time that the replay stopped.
        public let replayEndTime: Date?
        /// The name of the replay.
        public let replayName: String?
        /// A time stamp for the time that the replay started.
        public let replayStartTime: Date?
        /// The current state of the replay.
        public let state: ReplayState?
        /// The reason that the replay is in the current state.
        public let stateReason: String?

        @inlinable
        public init(description: String? = nil, destination: ReplayDestination? = nil, eventEndTime: Date? = nil, eventLastReplayedTime: Date? = nil, eventSourceArn: String? = nil, eventStartTime: Date? = nil, replayArn: String? = nil, replayEndTime: Date? = nil, replayName: String? = nil, replayStartTime: Date? = nil, state: ReplayState? = nil, stateReason: String? = nil) {
            self.description = description
            self.destination = destination
            self.eventEndTime = eventEndTime
            self.eventLastReplayedTime = eventLastReplayedTime
            self.eventSourceArn = eventSourceArn
            self.eventStartTime = eventStartTime
            self.replayArn = replayArn
            self.replayEndTime = replayEndTime
            self.replayName = replayName
            self.replayStartTime = replayStartTime
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case destination = "Destination"
            case eventEndTime = "EventEndTime"
            case eventLastReplayedTime = "EventLastReplayedTime"
            case eventSourceArn = "EventSourceArn"
            case eventStartTime = "EventStartTime"
            case replayArn = "ReplayArn"
            case replayEndTime = "ReplayEndTime"
            case replayName = "ReplayName"
            case replayStartTime = "ReplayStartTime"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct DescribeRuleRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The name of the rule.
        public let name: String

        @inlinable
        public init(eventBusName: String? = nil, name: String) {
            self.eventBusName = eventBusName
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case name = "Name"
        }
    }

    public struct DescribeRuleResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the rule.
        public let arn: String?
        /// The account ID of the user that created the rule. If you use PutRule to put a rule on an event bus in another account, the other account is the owner of the rule, and the rule ARN includes the account ID for that account. However, the value for CreatedBy is the account ID as the account that created the rule in the other account.
        public let createdBy: String?
        /// The description of the rule.
        public let description: String?
        /// The name of the event bus associated with the rule.
        public let eventBusName: String?
        /// The event pattern. For more information, see Events and Event Patterns in the  Amazon EventBridge User Guide .
        public let eventPattern: String?
        /// If this is a managed rule, created by an Amazon Web Services service on your behalf, this field displays the principal name of the Amazon Web Services service that created the rule.
        public let managedBy: String?
        /// The name of the rule.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the IAM role associated with the rule.
        public let roleArn: String?
        /// The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
        public let scheduleExpression: String?
        /// Specifies whether the rule is enabled or disabled.
        public let state: RuleState?

        @inlinable
        public init(arn: String? = nil, createdBy: String? = nil, description: String? = nil, eventBusName: String? = nil, eventPattern: String? = nil, managedBy: String? = nil, name: String? = nil, roleArn: String? = nil, scheduleExpression: String? = nil, state: RuleState? = nil) {
            self.arn = arn
            self.createdBy = createdBy
            self.description = description
            self.eventBusName = eventBusName
            self.eventPattern = eventPattern
            self.managedBy = managedBy
            self.name = name
            self.roleArn = roleArn
            self.scheduleExpression = scheduleExpression
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdBy = "CreatedBy"
            case description = "Description"
            case eventBusName = "EventBusName"
            case eventPattern = "EventPattern"
            case managedBy = "ManagedBy"
            case name = "Name"
            case roleArn = "RoleArn"
            case scheduleExpression = "ScheduleExpression"
            case state = "State"
        }
    }

    public struct DisableRuleRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The name of the rule.
        public let name: String

        @inlinable
        public init(eventBusName: String? = nil, name: String) {
            self.eventBusName = eventBusName
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case name = "Name"
        }
    }

    public struct EcsParameters: AWSEncodableShape & AWSDecodableShape {
        /// The capacity provider strategy to use for the task. If a capacityProviderStrategy is specified, the launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy for the cluster is used.
        public let capacityProviderStrategy: [CapacityProviderStrategyItem]?
        /// Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
        public let enableECSManagedTags: Bool?
        /// Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.
        public let enableExecuteCommand: Bool?
        /// Specifies an ECS task group for the task. The maximum length is 255 characters.
        public let group: String?
        /// Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.
        public let launchType: LaunchType?
        /// Use this structure if the Amazon ECS task uses the awsvpc network mode. This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. If you specify NetworkConfiguration when the target ECS task does not use the awsvpc network mode, the task fails.
        public let networkConfiguration: NetworkConfiguration?
        /// An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
        public let placementConstraints: [PlacementConstraint]?
        /// The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.
        public let placementStrategy: [PlacementStrategy]?
        /// Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0. This structure is used only if LaunchType is FARGATE. For more information about valid platform versions, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
        public let platformVersion: String?
        /// Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
        public let propagateTags: PropagateTags?
        /// The reference ID to use for the task.
        public let referenceId: String?
        /// The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
        public let tags: [Tag]?
        /// The number of tasks to create based on TaskDefinition. The default is 1.
        public let taskCount: Int?
        /// The ARN of the task definition to use if the event target is an Amazon ECS task.
        public let taskDefinitionArn: String

        @inlinable
        public init(capacityProviderStrategy: [CapacityProviderStrategyItem]? = nil, enableECSManagedTags: Bool? = nil, enableExecuteCommand: Bool? = nil, group: String? = nil, launchType: LaunchType? = nil, networkConfiguration: NetworkConfiguration? = nil, placementConstraints: [PlacementConstraint]? = nil, placementStrategy: [PlacementStrategy]? = nil, platformVersion: String? = nil, propagateTags: PropagateTags? = nil, referenceId: String? = nil, tags: [Tag]? = nil, taskCount: Int? = nil, taskDefinitionArn: String) {
            self.capacityProviderStrategy = capacityProviderStrategy
            self.enableECSManagedTags = enableECSManagedTags
            self.enableExecuteCommand = enableExecuteCommand
            self.group = group
            self.launchType = launchType
            self.networkConfiguration = networkConfiguration
            self.placementConstraints = placementConstraints
            self.placementStrategy = placementStrategy
            self.platformVersion = platformVersion
            self.propagateTags = propagateTags
            self.referenceId = referenceId
            self.tags = tags
            self.taskCount = taskCount
            self.taskDefinitionArn = taskDefinitionArn
        }

        public func validate(name: String) throws {
            try self.capacityProviderStrategy?.forEach {
                try $0.validate(name: "\(name).capacityProviderStrategy[]")
            }
            try self.validate(self.capacityProviderStrategy, name: "capacityProviderStrategy", parent: name, max: 6)
            try self.placementConstraints?.forEach {
                try $0.validate(name: "\(name).placementConstraints[]")
            }
            try self.validate(self.placementConstraints, name: "placementConstraints", parent: name, max: 10)
            try self.placementStrategy?.forEach {
                try $0.validate(name: "\(name).placementStrategy[]")
            }
            try self.validate(self.placementStrategy, name: "placementStrategy", parent: name, max: 5)
            try self.validate(self.referenceId, name: "referenceId", parent: name, max: 1024)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.taskCount, name: "taskCount", parent: name, min: 1)
            try self.validate(self.taskDefinitionArn, name: "taskDefinitionArn", parent: name, max: 1600)
            try self.validate(self.taskDefinitionArn, name: "taskDefinitionArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case capacityProviderStrategy = "CapacityProviderStrategy"
            case enableECSManagedTags = "EnableECSManagedTags"
            case enableExecuteCommand = "EnableExecuteCommand"
            case group = "Group"
            case launchType = "LaunchType"
            case networkConfiguration = "NetworkConfiguration"
            case placementConstraints = "PlacementConstraints"
            case placementStrategy = "PlacementStrategy"
            case platformVersion = "PlatformVersion"
            case propagateTags = "PropagateTags"
            case referenceId = "ReferenceId"
            case tags = "Tags"
            case taskCount = "TaskCount"
            case taskDefinitionArn = "TaskDefinitionArn"
        }
    }

    public struct EnableRuleRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The name of the rule.
        public let name: String

        @inlinable
        public init(eventBusName: String? = nil, name: String) {
            self.eventBusName = eventBusName
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case name = "Name"
        }
    }

    public struct Endpoint: AWSDecodableShape {
        /// The ARN of the endpoint.
        public let arn: String?
        /// The time the endpoint was created.
        public let creationTime: Date?
        /// A description for the endpoint.
        public let description: String?
        /// The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is abcde.veo.
        public let endpointId: String?
        /// The URL of the endpoint.
        public let endpointUrl: String?
        /// The event buses being used by the endpoint.
        public let eventBuses: [EndpointEventBus]?
        /// The last time the endpoint was modified.
        public let lastModifiedTime: Date?
        /// The name of the endpoint.
        public let name: String?
        /// Whether event replication was enabled or disabled for this endpoint. The default state is ENABLED which means you must supply a RoleArn. If you don't have a RoleArn or you don't want event replication enabled, set the state to DISABLED.
        public let replicationConfig: ReplicationConfig?
        /// The ARN of the role used by event replication for the endpoint.
        public let roleArn: String?
        /// The routing configuration of the endpoint.
        public let routingConfig: RoutingConfig?
        /// The current state of the endpoint.
        public let state: EndpointState?
        /// The reason the endpoint is in its current state.
        public let stateReason: String?

        @inlinable
        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, endpointId: String? = nil, endpointUrl: String? = nil, eventBuses: [EndpointEventBus]? = nil, lastModifiedTime: Date? = nil, name: String? = nil, replicationConfig: ReplicationConfig? = nil, roleArn: String? = nil, routingConfig: RoutingConfig? = nil, state: EndpointState? = nil, stateReason: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.endpointId = endpointId
            self.endpointUrl = endpointUrl
            self.eventBuses = eventBuses
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.replicationConfig = replicationConfig
            self.roleArn = roleArn
            self.routingConfig = routingConfig
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case creationTime = "CreationTime"
            case description = "Description"
            case endpointId = "EndpointId"
            case endpointUrl = "EndpointUrl"
            case eventBuses = "EventBuses"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
            case replicationConfig = "ReplicationConfig"
            case roleArn = "RoleArn"
            case routingConfig = "RoutingConfig"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct EndpointEventBus: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the event bus the endpoint is associated with.
        public let eventBusArn: String

        @inlinable
        public init(eventBusArn: String) {
            self.eventBusArn = eventBusArn
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusArn, name: "eventBusArn", parent: name, max: 512)
            try self.validate(self.eventBusArn, name: "eventBusArn", parent: name, min: 1)
            try self.validate(self.eventBusArn, name: "eventBusArn", parent: name, pattern: "^arn:aws[a-z-]*:events:[a-z]+-[a-z-]+-\\d+:\\d{12}:event-bus/[\\w.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusArn = "EventBusArn"
        }
    }

    public struct EventBus: AWSDecodableShape {
        /// The ARN of the event bus.
        public let arn: String?
        /// The time the event bus was created.
        public let creationTime: Date?
        /// The event bus description.
        public let description: String?
        /// The time the event bus was last modified.
        public let lastModifiedTime: Date?
        /// The name of the event bus.
        public let name: String?
        /// The permissions policy of the event bus, describing which other Amazon Web Services accounts can write events to this event bus.
        public let policy: String?

        @inlinable
        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, policy: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case creationTime = "CreationTime"
            case description = "Description"
            case lastModifiedTime = "LastModifiedTime"
            case name = "Name"
            case policy = "Policy"
        }
    }

    public struct EventSource: AWSDecodableShape {
        /// The ARN of the event source.
        public let arn: String?
        /// The name of the partner that created the event source.
        public let createdBy: String?
        /// The date and time the event source was created.
        public let creationTime: Date?
        /// The date and time that the event source will expire, if the Amazon Web Services account doesn't create a matching event bus for it.
        public let expirationTime: Date?
        /// The name of the event source.
        public let name: String?
        /// The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
        public let state: EventSourceState?

        @inlinable
        public init(arn: String? = nil, createdBy: String? = nil, creationTime: Date? = nil, expirationTime: Date? = nil, name: String? = nil, state: EventSourceState? = nil) {
            self.arn = arn
            self.createdBy = createdBy
            self.creationTime = creationTime
            self.expirationTime = expirationTime
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdBy = "CreatedBy"
            case creationTime = "CreationTime"
            case expirationTime = "ExpirationTime"
            case name = "Name"
            case state = "State"
        }
    }

    public struct FailoverConfig: AWSEncodableShape & AWSDecodableShape {
        /// The main Region of the endpoint.
        public let primary: Primary
        /// The Region that events are routed to when failover is triggered or event replication is enabled.
        public let secondary: Secondary

        @inlinable
        public init(primary: Primary, secondary: Secondary) {
            self.primary = primary
            self.secondary = secondary
        }

        public func validate(name: String) throws {
            try self.primary.validate(name: "\(name).primary")
            try self.secondary.validate(name: "\(name).secondary")
        }

        private enum CodingKeys: String, CodingKey {
            case primary = "Primary"
            case secondary = "Secondary"
        }
    }

    public struct HttpParameters: AWSEncodableShape & AWSDecodableShape {
        /// The headers that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.
        public let headerParameters: [String: String]?
        /// The path parameter values to be used to populate API Gateway API or EventBridge ApiDestination path wildcards ("*").
        public let pathParameterValues: [String]?
        /// The query string keys/values that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.
        public let queryStringParameters: [String: String]?

        @inlinable
        public init(headerParameters: [String: String]? = nil, pathParameterValues: [String]? = nil, queryStringParameters: [String: String]? = nil) {
            self.headerParameters = headerParameters
            self.pathParameterValues = pathParameterValues
            self.queryStringParameters = queryStringParameters
        }

        public func validate(name: String) throws {
            try self.headerParameters?.forEach {
                try validate($0.key, name: "headerParameters.key", parent: name, max: 512)
                try validate($0.key, name: "headerParameters.key", parent: name, pattern: "^[!#$%&'*+-.^_`|~0-9a-zA-Z]+$")
                try validate($0.value, name: "headerParameters[\"\($0.key)\"]", parent: name, max: 512)
                try validate($0.value, name: "headerParameters[\"\($0.key)\"]", parent: name, pattern: "^[ \\t]*[\\x20-\\x7E]+([ \\t]+[\\x20-\\x7E]+)*[ \\t]*$")
            }
            try self.pathParameterValues?.forEach {
                try validate($0, name: "pathParameterValues[]", parent: name, pattern: "^(?!\\s*$).+$")
            }
            try self.queryStringParameters?.forEach {
                try validate($0.key, name: "queryStringParameters.key", parent: name, max: 512)
                try validate($0.key, name: "queryStringParameters.key", parent: name, pattern: "^[^\\x00-\\x1F\\x7F]+$")
                try validate($0.value, name: "queryStringParameters[\"\($0.key)\"]", parent: name, max: 512)
                try validate($0.value, name: "queryStringParameters[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case headerParameters = "HeaderParameters"
            case pathParameterValues = "PathParameterValues"
            case queryStringParameters = "QueryStringParameters"
        }
    }

    public struct InputTransformer: AWSEncodableShape & AWSDecodableShape {
        /// Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate to produce the output you want to be sent to the target.  InputPathsMap is an array key-value pairs, where each value is a valid JSON path. You can have as many as 100 key-value pairs. You must use JSON dot notation, not bracket notation. The keys cannot start with "Amazon Web Services."
        public let inputPathsMap: [String: String]?
        /// Input template where you specify placeholders that will be filled with the values of the keys from InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: value>  If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply:   The placeholder cannot be used as an object key.   The following example shows the syntax for using InputPathsMap and InputTemplate.  "InputTransformer":   {   "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},   "InputTemplate": " is in state "   }  To have the InputTemplate include quote marks within a JSON string, escape each quote marks with a slash, as in the following example:  "InputTransformer":   {   "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},   "InputTemplate": " is in state \"\""   }  The InputTemplate can also be valid JSON with varibles in quotes or out, as in the following example:  "InputTransformer":   {   "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},   "InputTemplate": '{"myInstance": ,"myStatus": " is in state \"\""}'   }
        public let inputTemplate: String

        @inlinable
        public init(inputPathsMap: [String: String]? = nil, inputTemplate: String) {
            self.inputPathsMap = inputPathsMap
            self.inputTemplate = inputTemplate
        }

        public func validate(name: String) throws {
            try self.inputPathsMap?.forEach {
                try validate($0.key, name: "inputPathsMap.key", parent: name, max: 256)
                try validate($0.key, name: "inputPathsMap.key", parent: name, min: 1)
                try validate($0.key, name: "inputPathsMap.key", parent: name, pattern: "^[A-Za-z0-9\\_\\-]+$")
                try validate($0.value, name: "inputPathsMap[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.inputPathsMap, name: "inputPathsMap", parent: name, max: 100)
            try self.validate(self.inputTemplate, name: "inputTemplate", parent: name, max: 8192)
            try self.validate(self.inputTemplate, name: "inputTemplate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case inputPathsMap = "InputPathsMap"
            case inputTemplate = "InputTemplate"
        }
    }

    public struct KinesisParameters: AWSEncodableShape & AWSDecodableShape {
        /// The JSON path to be extracted from the event and used as the partition key. For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide.
        public let partitionKeyPath: String

        @inlinable
        public init(partitionKeyPath: String) {
            self.partitionKeyPath = partitionKeyPath
        }

        public func validate(name: String) throws {
            try self.validate(self.partitionKeyPath, name: "partitionKeyPath", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case partitionKeyPath = "PartitionKeyPath"
        }
    }

    public struct ListApiDestinationsRequest: AWSEncodableShape {
        /// The ARN of the connection specified for the API destination.
        public let connectionArn: String?
        /// The maximum number of API destinations to include in the response.
        public let limit: Int?
        /// A name prefix to filter results returned. Only API destinations with a name that starts with the prefix are returned.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(connectionArn: String? = nil, limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil) {
            self.connectionArn = connectionArn
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, max: 1600)
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, min: 1)
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:connection\\/[\\.\\-_A-Za-z0-9]+\\/[\\-A-Za-z0-9]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 64)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListApiDestinationsResponse: AWSDecodableShape {
        /// An array that includes information about each API destination.
        public let apiDestinations: [ApiDestination]?
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(apiDestinations: [ApiDestination]? = nil, nextToken: String? = nil) {
            self.apiDestinations = apiDestinations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case apiDestinations = "ApiDestinations"
            case nextToken = "NextToken"
        }
    }

    public struct ListArchivesRequest: AWSEncodableShape {
        /// The ARN of the event source associated with the archive.
        public let eventSourceArn: String?
        /// The maximum number of results to return.
        public let limit: Int?
        /// A name prefix to filter the archives returned. Only archives with name that match the prefix are returned.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The state of the archive.
        public let state: ArchiveState?

        @inlinable
        public init(eventSourceArn: String? = nil, limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil, state: ArchiveState? = nil) {
            self.eventSourceArn = eventSourceArn
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
            self.state = state
        }

        public func validate(name: String) throws {
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, max: 1600)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, min: 1)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:.+\\/.+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 48)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventSourceArn = "EventSourceArn"
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
            case state = "State"
        }
    }

    public struct ListArchivesResponse: AWSDecodableShape {
        /// An array of Archive objects that include details about an archive.
        public let archives: [Archive]?
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(archives: [Archive]? = nil, nextToken: String? = nil) {
            self.archives = archives
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case archives = "Archives"
            case nextToken = "NextToken"
        }
    }

    public struct ListConnectionsRequest: AWSEncodableShape {
        /// The state of the connection.
        public let connectionState: ConnectionState?
        /// The maximum number of connections to return.
        public let limit: Int?
        /// A name prefix to filter results returned. Only connections with a name that starts with the prefix are returned.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(connectionState: ConnectionState? = nil, limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil) {
            self.connectionState = connectionState
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 64)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case connectionState = "ConnectionState"
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListConnectionsResponse: AWSDecodableShape {
        /// An array of connections objects that include details about the connections.
        public let connections: [Connection]?
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(connections: [Connection]? = nil, nextToken: String? = nil) {
            self.connections = connections
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case connections = "Connections"
            case nextToken = "NextToken"
        }
    }

    public struct ListEndpointsRequest: AWSEncodableShape {
        /// The primary Region of the endpoints associated with this account. For example "HomeRegion": "us-east-1".
        public let homeRegion: String?
        /// The maximum number of results returned by the call.
        public let maxResults: Int?
        /// A value that will return a subset of the endpoints associated with this account. For example, "NamePrefix": "ABC" will return all endpoints with "ABC" in the name.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(homeRegion: String? = nil, maxResults: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil) {
            self.homeRegion = homeRegion
            self.maxResults = maxResults
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.homeRegion, name: "homeRegion", parent: name, max: 20)
            try self.validate(self.homeRegion, name: "homeRegion", parent: name, min: 9)
            try self.validate(self.homeRegion, name: "homeRegion", parent: name, pattern: "^[\\-a-z0-9]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 64)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case homeRegion = "HomeRegion"
            case maxResults = "MaxResults"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListEndpointsResponse: AWSDecodableShape {
        /// The endpoints returned by the call.
        public let endpoints: [Endpoint]?
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(endpoints: [Endpoint]? = nil, nextToken: String? = nil) {
            self.endpoints = endpoints
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case endpoints = "Endpoints"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventBusesRequest: AWSEncodableShape {
        /// Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
        public let limit: Int?
        /// Specifying this limits the results to only those event buses with names that start with the specified prefix.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil) {
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 256)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventBusesResponse: AWSDecodableShape {
        /// This list of event buses.
        public let eventBuses: [EventBus]?
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(eventBuses: [EventBus]? = nil, nextToken: String? = nil) {
            self.eventBuses = eventBuses
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case eventBuses = "EventBuses"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventSourcesRequest: AWSEncodableShape {
        /// Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
        public let limit: Int?
        /// Specifying this limits the results to only those partner event sources with names that start with the specified prefix.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil) {
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 256)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventSourcesResponse: AWSDecodableShape {
        /// The list of event sources.
        public let eventSources: [EventSource]?
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(eventSources: [EventSource]? = nil, nextToken: String? = nil) {
            self.eventSources = eventSources
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case eventSources = "EventSources"
            case nextToken = "NextToken"
        }
    }

    public struct ListPartnerEventSourceAccountsRequest: AWSEncodableShape {
        /// The name of the partner event source to display account information about.
        public let eventSourceName: String
        /// Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
        public let limit: Int?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(eventSourceName: String, limit: Int? = nil, nextToken: String? = nil) {
            self.eventSourceName = eventSourceName
            self.limit = limit
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.eventSourceName, name: "eventSourceName", parent: name, max: 256)
            try self.validate(self.eventSourceName, name: "eventSourceName", parent: name, min: 1)
            try self.validate(self.eventSourceName, name: "eventSourceName", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventSourceName = "EventSourceName"
            case limit = "Limit"
            case nextToken = "NextToken"
        }
    }

    public struct ListPartnerEventSourceAccountsResponse: AWSDecodableShape {
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The list of partner event sources returned by the operation.
        public let partnerEventSourceAccounts: [PartnerEventSourceAccount]?

        @inlinable
        public init(nextToken: String? = nil, partnerEventSourceAccounts: [PartnerEventSourceAccount]? = nil) {
            self.nextToken = nextToken
            self.partnerEventSourceAccounts = partnerEventSourceAccounts
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case partnerEventSourceAccounts = "PartnerEventSourceAccounts"
        }
    }

    public struct ListPartnerEventSourcesRequest: AWSEncodableShape {
        /// pecifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
        public let limit: Int?
        /// If you specify this, the results are limited to only those partner event sources that start with the string you specify.
        public let namePrefix: String
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(limit: Int? = nil, namePrefix: String, nextToken: String? = nil) {
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 256)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^aws\\.partner/[\\.\\-_A-Za-z0-9]+/[/\\.\\-_A-Za-z0-9]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListPartnerEventSourcesResponse: AWSDecodableShape {
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The list of partner event sources returned by the operation.
        public let partnerEventSources: [PartnerEventSource]?

        @inlinable
        public init(nextToken: String? = nil, partnerEventSources: [PartnerEventSource]? = nil) {
            self.nextToken = nextToken
            self.partnerEventSources = partnerEventSources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case partnerEventSources = "PartnerEventSources"
        }
    }

    public struct ListReplaysRequest: AWSEncodableShape {
        /// The ARN of the archive from which the events are replayed.
        public let eventSourceArn: String?
        /// The maximum number of replays to retrieve.
        public let limit: Int?
        /// A name prefix to filter the replays returned. Only replays with name that match the prefix are returned.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The state of the replay.
        public let state: ReplayState?

        @inlinable
        public init(eventSourceArn: String? = nil, limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil, state: ReplayState? = nil) {
            self.eventSourceArn = eventSourceArn
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
            self.state = state
        }

        public func validate(name: String) throws {
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, max: 1600)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, min: 1)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:.+\\/.+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 64)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventSourceArn = "EventSourceArn"
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
            case state = "State"
        }
    }

    public struct ListReplaysResponse: AWSDecodableShape {
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// An array of Replay objects that contain information about the replay.
        public let replays: [Replay]?

        @inlinable
        public init(nextToken: String? = nil, replays: [Replay]? = nil) {
            self.nextToken = nextToken
            self.replays = replays
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case replays = "Replays"
        }
    }

    public struct ListRuleNamesByTargetRequest: AWSEncodableShape {
        /// The name or ARN of the event bus to list rules for. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The maximum number of results to return.
        public let limit: Int?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the target resource.
        public let targetArn: String

        @inlinable
        public init(eventBusName: String? = nil, limit: Int? = nil, nextToken: String? = nil, targetArn: String) {
            self.eventBusName = eventBusName
            self.limit = limit
            self.nextToken = nextToken
            self.targetArn = targetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 1600)
            try self.validate(self.targetArn, name: "targetArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case limit = "Limit"
            case nextToken = "NextToken"
            case targetArn = "TargetArn"
        }
    }

    public struct ListRuleNamesByTargetResponse: AWSDecodableShape {
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The names of the rules that can invoke the given target.
        public let ruleNames: [String]?

        @inlinable
        public init(nextToken: String? = nil, ruleNames: [String]? = nil) {
            self.nextToken = nextToken
            self.ruleNames = ruleNames
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case ruleNames = "RuleNames"
        }
    }

    public struct ListRulesRequest: AWSEncodableShape {
        /// The name or ARN of the event bus to list the rules for. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The maximum number of results to return.
        public let limit: Int?
        /// The prefix matching the rule name.
        public let namePrefix: String?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?

        @inlinable
        public init(eventBusName: String? = nil, limit: Int? = nil, namePrefix: String? = nil, nextToken: String? = nil) {
            self.eventBusName = eventBusName
            self.limit = limit
            self.namePrefix = namePrefix
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 64)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case limit = "Limit"
            case namePrefix = "NamePrefix"
            case nextToken = "NextToken"
        }
    }

    public struct ListRulesResponse: AWSDecodableShape {
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The rules that match the specified criteria.
        public let rules: [Rule]?

        @inlinable
        public init(nextToken: String? = nil, rules: [Rule]? = nil) {
            self.nextToken = nextToken
            self.rules = rules
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case rules = "Rules"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The ARN of the EventBridge resource for which you want to view tags.
        public let resourceARN: String

        @inlinable
        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1600)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The list of tag keys and values associated with the resource you specified
        public let tags: [Tag]?

        @inlinable
        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListTargetsByRuleRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The maximum number of results to return.
        public let limit: Int?
        /// The token returned by a previous call, which you can use to retrieve the next set of results. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The name of the rule.
        public let rule: String

        @inlinable
        public init(eventBusName: String? = nil, limit: Int? = nil, nextToken: String? = nil, rule: String) {
            self.eventBusName = eventBusName
            self.limit = limit
            self.nextToken = nextToken
            self.rule = rule
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 100)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.rule, name: "rule", parent: name, max: 64)
            try self.validate(self.rule, name: "rule", parent: name, min: 1)
            try self.validate(self.rule, name: "rule", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case limit = "Limit"
            case nextToken = "NextToken"
            case rule = "Rule"
        }
    }

    public struct ListTargetsByRuleResponse: AWSDecodableShape {
        /// A token indicating there are more results available. If there are no more results, no token is included in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The targets assigned to the rule.
        public let targets: [Target]?

        @inlinable
        public init(nextToken: String? = nil, targets: [Target]? = nil) {
            self.nextToken = nextToken
            self.targets = targets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case targets = "Targets"
        }
    }

    public struct LogConfig: AWSEncodableShape & AWSDecodableShape {
        /// Whether EventBridge include detailed event information in the records it generates.  Detailed data can be useful for troubleshooting and debugging. This information includes details of the event itself, as well as target details. For more information, see Including detail data in event bus logs in the EventBridge User Guide.
        public let includeDetail: IncludeDetail?
        /// The level of logging detail to include. This applies to all log destinations for the event bus. For more information, see Specifying event bus log level in the EventBridge User Guide.
        public let level: Level?

        @inlinable
        public init(includeDetail: IncludeDetail? = nil, level: Level? = nil) {
            self.includeDetail = includeDetail
            self.level = level
        }

        private enum CodingKeys: String, CodingKey {
            case includeDetail = "IncludeDetail"
            case level = "Level"
        }
    }

    public struct NetworkConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.
        public let awsvpcConfiguration: AwsVpcConfiguration?

        @inlinable
        public init(awsvpcConfiguration: AwsVpcConfiguration? = nil) {
            self.awsvpcConfiguration = awsvpcConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case awsvpcConfiguration = "awsvpcConfiguration"
        }
    }

    public struct PartnerEventSource: AWSDecodableShape {
        /// The ARN of the partner event source.
        public let arn: String?
        /// The name of the partner event source.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, name: String? = nil) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case name = "Name"
        }
    }

    public struct PartnerEventSourceAccount: AWSDecodableShape {
        /// The Amazon Web Services account ID that the partner event source was offered to.
        public let account: String?
        /// The date and time the event source was created.
        public let creationTime: Date?
        /// The date and time that the event source will expire, if the Amazon Web Services account doesn't create a matching event bus for it.
        public let expirationTime: Date?
        /// The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
        public let state: EventSourceState?

        @inlinable
        public init(account: String? = nil, creationTime: Date? = nil, expirationTime: Date? = nil, state: EventSourceState? = nil) {
            self.account = account
            self.creationTime = creationTime
            self.expirationTime = expirationTime
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case account = "Account"
            case creationTime = "CreationTime"
            case expirationTime = "ExpirationTime"
            case state = "State"
        }
    }

    public struct PlacementConstraint: AWSEncodableShape & AWSDecodableShape {
        /// A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.
        public let expression: String?
        /// The type of constraint. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.
        public let type: PlacementConstraintType?

        @inlinable
        public init(expression: String? = nil, type: PlacementConstraintType? = nil) {
            self.expression = expression
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.expression, name: "expression", parent: name, max: 2000)
        }

        private enum CodingKeys: String, CodingKey {
            case expression = "expression"
            case type = "type"
        }
    }

    public struct PlacementStrategy: AWSEncodableShape & AWSDecodableShape {
        /// The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values are cpu and memory. For the random placement strategy, this field is not used.
        public let field: String?
        /// The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).
        public let type: PlacementStrategyType?

        @inlinable
        public init(field: String? = nil, type: PlacementStrategyType? = nil) {
            self.field = field
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.field, name: "field", parent: name, max: 255)
        }

        private enum CodingKeys: String, CodingKey {
            case field = "field"
            case type = "type"
        }
    }

    public struct Primary: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the health check used by the endpoint to determine whether failover is triggered.
        public let healthCheck: String

        @inlinable
        public init(healthCheck: String) {
            self.healthCheck = healthCheck
        }

        public func validate(name: String) throws {
            try self.validate(self.healthCheck, name: "healthCheck", parent: name, max: 1600)
            try self.validate(self.healthCheck, name: "healthCheck", parent: name, min: 1)
            try self.validate(self.healthCheck, name: "healthCheck", parent: name, pattern: "^arn:aws([a-z]|\\-)*:route53:::healthcheck/[\\-a-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case healthCheck = "HealthCheck"
        }
    }

    public struct PutEventsRequest: AWSEncodableShape {
        /// The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is abcde.veo.  When using Java, you must include auth-crt on the class path.
        public let endpointId: String?
        /// The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.
        public let entries: [PutEventsRequestEntry]

        @inlinable
        public init(endpointId: String? = nil, entries: [PutEventsRequestEntry]) {
            self.endpointId = endpointId
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointId, name: "endpointId", parent: name, max: 50)
            try self.validate(self.endpointId, name: "endpointId", parent: name, min: 1)
            try self.validate(self.endpointId, name: "endpointId", parent: name, pattern: "^[A-Za-z0-9\\-]+[\\.][A-Za-z0-9\\-]+$")
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 10)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case endpointId = "EndpointId"
            case entries = "Entries"
        }
    }

    public struct PutEventsRequestEntry: AWSEncodableShape {
        /// A valid JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.   Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus.  If you include event entries in a request that do not include each of those properties, EventBridge fails that entry.  If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
        public let detail: String?
        /// Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.   Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus.  If you include event entries in a request that do not include each of those properties, EventBridge fails that entry.  If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
        public let detailType: String?
        /// The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.  If you're using a global endpoint with a custom bus, you can enter either the name or Amazon Resource Name (ARN) of the event bus in either the primary or secondary Region here. EventBridge then determines the corresponding event bus in the other Region based on the endpoint referenced by the EndpointId. Specifying the event bus ARN is preferred.
        public let eventBusName: String?
        /// Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.
        public let resources: [String]?
        /// The source of the event.   Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus.  If you include event entries in a request that do not include each of those properties, EventBridge fails that entry.  If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
        public let source: String?
        /// The time stamp of the event, per RFC3339. If no time stamp is provided, the time stamp of the PutEvents call is used.
        public let time: Date?
        /// An X-Ray trace header, which is an http header (X-Amzn-Trace-Id) that contains the trace-id associated with the event. To learn more about X-Ray trace headers, see Tracing header in the X-Ray Developer Guide.
        public let traceHeader: String?

        @inlinable
        public init(detail: String? = nil, detailType: String? = nil, eventBusName: String? = nil, resources: [String]? = nil, source: String? = nil, time: Date? = nil, traceHeader: String? = nil) {
            self.detail = detail
            self.detailType = detailType
            self.eventBusName = eventBusName
            self.resources = resources
            self.source = source
            self.time = time
            self.traceHeader = traceHeader
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[\\.\\-_A-Za-z0-9]+$")
            try self.resources?.forEach {
                try validate($0, name: "resources[]", parent: name, max: 2048)
            }
            try self.validate(self.traceHeader, name: "traceHeader", parent: name, max: 500)
            try self.validate(self.traceHeader, name: "traceHeader", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case detail = "Detail"
            case detailType = "DetailType"
            case eventBusName = "EventBusName"
            case resources = "Resources"
            case source = "Source"
            case time = "Time"
            case traceHeader = "TraceHeader"
        }
    }

    public struct PutEventsResponse: AWSDecodableShape {
        /// The successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry. For each record, the index of the response element is the same as the index in the request array.
        public let entries: [PutEventsResultEntry]?
        /// The number of failed entries.
        public let failedEntryCount: Int?

        @inlinable
        public init(entries: [PutEventsResultEntry]? = nil, failedEntryCount: Int? = nil) {
            self.entries = entries
            self.failedEntryCount = failedEntryCount
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "Entries"
            case failedEntryCount = "FailedEntryCount"
        }
    }

    public struct PutEventsResultEntry: AWSDecodableShape {
        /// The error code that indicates why the event submission failed. Retryable errors include:     InternalFailure   The request processing has failed because of an unknown error, exception or failure.     ThrottlingException   The request was denied due to request throttling.   Non-retryable errors include:     AccessDeniedException   You do not have sufficient access to perform this action.    InvalidAccountIdException  The account ID provided is not valid.    InvalidArgument  A specified parameter is not valid.    MalformedDetail  The JSON provided is not valid.    RedactionFailure  Redacting the CloudTrail event failed.    NotAuthorizedForSourceException  You do not have permissions to publish events with this source onto this event bus.    NotAuthorizedForDetailTypeException  You do not have permissions to publish events with this detail type onto this event bus.
        public let errorCode: String?
        /// The error message that explains why the event submission failed.
        public let errorMessage: String?
        /// The ID of the event.
        public let eventId: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, eventId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.eventId = eventId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case eventId = "EventId"
        }
    }

    public struct PutPartnerEventsRequest: AWSEncodableShape {
        /// The list of events to write to the event bus.
        public let entries: [PutPartnerEventsRequestEntry]

        @inlinable
        public init(entries: [PutPartnerEventsRequestEntry]) {
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
            try self.validate(self.entries, name: "entries", parent: name, max: 20)
            try self.validate(self.entries, name: "entries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "Entries"
        }
    }

    public struct PutPartnerEventsRequestEntry: AWSEncodableShape {
        /// A valid JSON string. There is no other schema imposed. The JSON string may contain fields and nested sub-objects.   Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus.  If you include event entries in a request that do not include each of those properties, EventBridge fails that entry.  If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
        public let detail: String?
        /// A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.   Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus.  If you include event entries in a request that do not include each of those properties, EventBridge fails that entry.  If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
        public let detailType: String?
        /// Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.
        public let resources: [String]?
        /// The event source that is generating the entry.   Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus.  If you include event entries in a request that do not include each of those properties, EventBridge fails that entry.  If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
        public let source: String?
        /// The date and time of the event.
        public let time: Date?

        @inlinable
        public init(detail: String? = nil, detailType: String? = nil, resources: [String]? = nil, source: String? = nil, time: Date? = nil) {
            self.detail = detail
            self.detailType = detailType
            self.resources = resources
            self.source = source
            self.time = time
        }

        public func validate(name: String) throws {
            try self.resources?.forEach {
                try validate($0, name: "resources[]", parent: name, max: 2048)
            }
            try self.validate(self.source, name: "source", parent: name, max: 256)
            try self.validate(self.source, name: "source", parent: name, min: 1)
            try self.validate(self.source, name: "source", parent: name, pattern: "^aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case detail = "Detail"
            case detailType = "DetailType"
            case resources = "Resources"
            case source = "Source"
            case time = "Time"
        }
    }

    public struct PutPartnerEventsResponse: AWSDecodableShape {
        /// The results for each event entry the partner submitted in this request. If the event was successfully submitted, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry. For each record, the index of the response element is the same as the index in the request array.
        public let entries: [PutPartnerEventsResultEntry]?
        /// The number of events from this operation that could not be written to the partner event bus.
        public let failedEntryCount: Int?

        @inlinable
        public init(entries: [PutPartnerEventsResultEntry]? = nil, failedEntryCount: Int? = nil) {
            self.entries = entries
            self.failedEntryCount = failedEntryCount
        }

        private enum CodingKeys: String, CodingKey {
            case entries = "Entries"
            case failedEntryCount = "FailedEntryCount"
        }
    }

    public struct PutPartnerEventsResultEntry: AWSDecodableShape {
        /// The error code that indicates why the event submission failed.
        public let errorCode: String?
        /// The error message that explains why the event submission failed.
        public let errorMessage: String?
        /// The ID of the event.
        public let eventId: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, eventId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.eventId = eventId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case eventId = "EventId"
        }
    }

    public struct PutPermissionRequest: AWSEncodableShape {
        /// The action that you are enabling the other account to perform.
        public let action: String?
        /// This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain Amazon Web Services organization. For more information about Amazon Web Services Organizations, see What Is Amazon Web Services Organizations in the Amazon Web Services Organizations User Guide. If you specify Condition with an Amazon Web Services organization ID, and specify "*" as the value for Principal, you grant permission to all the accounts in the named organization. The Condition is a JSON string which must contain Type, Key, and Value fields.
        public let condition: Condition?
        /// The name of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// A JSON string that describes the permission policy statement. You can include a Policy parameter in the request instead of using the StatementId, Action, Principal, or Condition parameters.
        public let policy: String?
        /// The 12-digit Amazon Web Services account ID that you are permitting to put events to your default event bus. Specify "*" to permit any account to put events to your default event bus. If you specify "*" without specifying Condition, avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an account field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts.
        public let principal: String?
        /// An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this StatementId when you run RemovePermission.  Each StatementId must be unique.
        public let statementId: String?

        @inlinable
        public init(action: String? = nil, condition: Condition? = nil, eventBusName: String? = nil, policy: String? = nil, principal: String? = nil, statementId: String? = nil) {
            self.action = action
            self.condition = condition
            self.eventBusName = eventBusName
            self.policy = policy
            self.principal = principal
            self.statementId = statementId
        }

        public func validate(name: String) throws {
            try self.validate(self.action, name: "action", parent: name, max: 64)
            try self.validate(self.action, name: "action", parent: name, min: 1)
            try self.validate(self.action, name: "action", parent: name, pattern: "^events:[a-zA-Z]+$")
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 256)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.principal, name: "principal", parent: name, max: 12)
            try self.validate(self.principal, name: "principal", parent: name, min: 1)
            try self.validate(self.principal, name: "principal", parent: name, pattern: "^(\\d{12}|\\*)$")
            try self.validate(self.statementId, name: "statementId", parent: name, max: 64)
            try self.validate(self.statementId, name: "statementId", parent: name, min: 1)
            try self.validate(self.statementId, name: "statementId", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case condition = "Condition"
            case eventBusName = "EventBusName"
            case policy = "Policy"
            case principal = "Principal"
            case statementId = "StatementId"
        }
    }

    public struct PutRuleRequest: AWSEncodableShape {
        /// A description of the rule.
        public let description: String?
        /// The name or ARN of the event bus to associate with this rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The event pattern. For more information, see Amazon EventBridge event patterns in the  Amazon EventBridge User Guide .
        public let eventPattern: String?
        /// The name of the rule that you are creating or updating.
        public let name: String
        /// The Amazon Resource Name (ARN) of the IAM role associated with the rule. If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure, instead of here in this parameter.
        public let roleArn: String?
        /// The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)".
        public let scheduleExpression: String?
        /// The state of the rule. Valid values include:    DISABLED: The rule is disabled. EventBridge does not match any events against the rule.    ENABLED: The rule is enabled.  EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail.    ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail. Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the  Amazon EventBridge User Guide . This value is only valid for rules on the default event bus  or custom event buses.  It does not apply to partner event buses.
        public let state: RuleState?
        /// The list of key-value pairs to associate with the rule.
        public let tags: [Tag]?

        @inlinable
        public init(description: String? = nil, eventBusName: String? = nil, eventPattern: String? = nil, name: String, roleArn: String? = nil, scheduleExpression: String? = nil, state: RuleState? = nil, tags: [Tag]? = nil) {
            self.description = description
            self.eventBusName = eventBusName
            self.eventPattern = eventPattern
            self.name = name
            self.roleArn = roleArn
            self.scheduleExpression = scheduleExpression
            self.state = state
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.eventPattern, name: "eventPattern", parent: name, max: 4096)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1600)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, max: 256)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case eventBusName = "EventBusName"
            case eventPattern = "EventPattern"
            case name = "Name"
            case roleArn = "RoleArn"
            case scheduleExpression = "ScheduleExpression"
            case state = "State"
            case tags = "Tags"
        }
    }

    public struct PutRuleResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the rule.
        public let ruleArn: String?

        @inlinable
        public init(ruleArn: String? = nil) {
            self.ruleArn = ruleArn
        }

        private enum CodingKeys: String, CodingKey {
            case ruleArn = "RuleArn"
        }
    }

    public struct PutTargetsRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The name of the rule.
        public let rule: String
        /// The targets to update or add to the rule.
        public let targets: [Target]

        @inlinable
        public init(eventBusName: String? = nil, rule: String, targets: [Target]) {
            self.eventBusName = eventBusName
            self.rule = rule
            self.targets = targets
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.rule, name: "rule", parent: name, max: 64)
            try self.validate(self.rule, name: "rule", parent: name, min: 1)
            try self.validate(self.rule, name: "rule", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.targets.forEach {
                try $0.validate(name: "\(name).targets[]")
            }
            try self.validate(self.targets, name: "targets", parent: name, max: 100)
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case rule = "Rule"
            case targets = "Targets"
        }
    }

    public struct PutTargetsResponse: AWSDecodableShape {
        /// The failed target entries.
        public let failedEntries: [PutTargetsResultEntry]?
        /// The number of failed entries.
        public let failedEntryCount: Int?

        @inlinable
        public init(failedEntries: [PutTargetsResultEntry]? = nil, failedEntryCount: Int? = nil) {
            self.failedEntries = failedEntries
            self.failedEntryCount = failedEntryCount
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntries = "FailedEntries"
            case failedEntryCount = "FailedEntryCount"
        }
    }

    public struct PutTargetsResultEntry: AWSDecodableShape {
        /// The error code that indicates why the target addition failed. If the value is ConcurrentModificationException, too many requests were made at the same time.
        public let errorCode: String?
        /// The error message that explains why the target addition failed.
        public let errorMessage: String?
        /// The ID of the target.
        public let targetId: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, targetId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.targetId = targetId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case targetId = "TargetId"
        }
    }

    public struct RedshiftDataParameters: AWSEncodableShape & AWSDecodableShape {
        /// The name of the database. Required when authenticating using temporary credentials.
        public let database: String
        /// The database user name. Required when authenticating using temporary credentials.
        public let dbUser: String?
        /// The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web Services Secrets Manager.
        public let secretManagerArn: String?
        /// The SQL statement text to run.
        public let sql: String?
        /// One or more SQL statements to run. The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.
        public let sqls: [String]?
        /// The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
        public let statementName: String?
        /// Indicates whether to send an event back to EventBridge after the SQL statement runs.
        public let withEvent: Bool?

        @inlinable
        public init(database: String, dbUser: String? = nil, secretManagerArn: String? = nil, sql: String? = nil, sqls: [String]? = nil, statementName: String? = nil, withEvent: Bool? = nil) {
            self.database = database
            self.dbUser = dbUser
            self.secretManagerArn = secretManagerArn
            self.sql = sql
            self.sqls = sqls
            self.statementName = statementName
            self.withEvent = withEvent
        }

        public func validate(name: String) throws {
            try self.validate(self.database, name: "database", parent: name, max: 64)
            try self.validate(self.database, name: "database", parent: name, min: 1)
            try self.validate(self.dbUser, name: "dbUser", parent: name, max: 128)
            try self.validate(self.dbUser, name: "dbUser", parent: name, min: 1)
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, max: 1600)
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, min: 1)
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, pattern: "^(^arn:aws([a-z]|\\-)*:secretsmanager:[a-z0-9-.]+:.*)|(\\$(\\.[\\w_-]+(\\[(\\d+|\\*)\\])*)*)$")
            try self.validate(self.sql, name: "sql", parent: name, max: 100000)
            try self.validate(self.sql, name: "sql", parent: name, min: 1)
            try self.sqls?.forEach {
                try validate($0, name: "sqls[]", parent: name, max: 100000)
                try validate($0, name: "sqls[]", parent: name, min: 1)
            }
            try self.validate(self.sqls, name: "sqls", parent: name, max: 40)
            try self.validate(self.statementName, name: "statementName", parent: name, max: 500)
            try self.validate(self.statementName, name: "statementName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case database = "Database"
            case dbUser = "DbUser"
            case secretManagerArn = "SecretManagerArn"
            case sql = "Sql"
            case sqls = "Sqls"
            case statementName = "StatementName"
            case withEvent = "WithEvent"
        }
    }

    public struct RemovePermissionRequest: AWSEncodableShape {
        /// The name of the event bus to revoke permissions for. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// Specifies whether to remove all permissions.
        public let removeAllPermissions: Bool?
        /// The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.
        public let statementId: String?

        @inlinable
        public init(eventBusName: String? = nil, removeAllPermissions: Bool? = nil, statementId: String? = nil) {
            self.eventBusName = eventBusName
            self.removeAllPermissions = removeAllPermissions
            self.statementId = statementId
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 256)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.statementId, name: "statementId", parent: name, max: 64)
            try self.validate(self.statementId, name: "statementId", parent: name, min: 1)
            try self.validate(self.statementId, name: "statementId", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case removeAllPermissions = "RemoveAllPermissions"
            case statementId = "StatementId"
        }
    }

    public struct RemoveTargetsRequest: AWSEncodableShape {
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.
        public let force: Bool?
        /// The IDs of the targets to remove from the rule.
        public let ids: [String]
        /// The name of the rule.
        public let rule: String

        @inlinable
        public init(eventBusName: String? = nil, force: Bool? = nil, ids: [String], rule: String) {
            self.eventBusName = eventBusName
            self.force = force
            self.ids = ids
            self.rule = rule
        }

        public func validate(name: String) throws {
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, max: 1600)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, min: 1)
            try self.validate(self.eventBusName, name: "eventBusName", parent: name, pattern: "^(arn:aws[\\w-]*:events:[a-z]+-[a-z]+-[\\w-]+:[0-9]{12}:event-bus\\/)?[/\\.\\-_A-Za-z0-9]+$")
            try self.ids.forEach {
                try validate($0, name: "ids[]", parent: name, max: 64)
                try validate($0, name: "ids[]", parent: name, min: 1)
                try validate($0, name: "ids[]", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            }
            try self.validate(self.ids, name: "ids", parent: name, max: 100)
            try self.validate(self.ids, name: "ids", parent: name, min: 1)
            try self.validate(self.rule, name: "rule", parent: name, max: 64)
            try self.validate(self.rule, name: "rule", parent: name, min: 1)
            try self.validate(self.rule, name: "rule", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventBusName = "EventBusName"
            case force = "Force"
            case ids = "Ids"
            case rule = "Rule"
        }
    }

    public struct RemoveTargetsResponse: AWSDecodableShape {
        /// The failed target entries.
        public let failedEntries: [RemoveTargetsResultEntry]?
        /// The number of failed entries.
        public let failedEntryCount: Int?

        @inlinable
        public init(failedEntries: [RemoveTargetsResultEntry]? = nil, failedEntryCount: Int? = nil) {
            self.failedEntries = failedEntries
            self.failedEntryCount = failedEntryCount
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntries = "FailedEntries"
            case failedEntryCount = "FailedEntryCount"
        }
    }

    public struct RemoveTargetsResultEntry: AWSDecodableShape {
        /// The error code that indicates why the target removal failed. If the value is ConcurrentModificationException, too many requests were made at the same time.
        public let errorCode: String?
        /// The error message that explains why the target removal failed.
        public let errorMessage: String?
        /// The ID of the target.
        public let targetId: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil, targetId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.targetId = targetId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case targetId = "TargetId"
        }
    }

    public struct Replay: AWSDecodableShape {
        /// A time stamp for the time to start replaying events. Any event with a creation time prior to the EventEndTime specified is replayed.
        public let eventEndTime: Date?
        /// A time stamp for the time that the last event was replayed.
        public let eventLastReplayedTime: Date?
        /// The ARN of the archive to replay event from.
        public let eventSourceArn: String?
        /// A time stamp for the time to start replaying events. This is determined by the time in the event as described in Time.
        public let eventStartTime: Date?
        /// A time stamp for the time that the replay completed.
        public let replayEndTime: Date?
        /// The name of the replay.
        public let replayName: String?
        /// A time stamp for the time that the replay started.
        public let replayStartTime: Date?
        /// The current state of the replay.
        public let state: ReplayState?
        /// A description of why the replay is in the current state.
        public let stateReason: String?

        @inlinable
        public init(eventEndTime: Date? = nil, eventLastReplayedTime: Date? = nil, eventSourceArn: String? = nil, eventStartTime: Date? = nil, replayEndTime: Date? = nil, replayName: String? = nil, replayStartTime: Date? = nil, state: ReplayState? = nil, stateReason: String? = nil) {
            self.eventEndTime = eventEndTime
            self.eventLastReplayedTime = eventLastReplayedTime
            self.eventSourceArn = eventSourceArn
            self.eventStartTime = eventStartTime
            self.replayEndTime = replayEndTime
            self.replayName = replayName
            self.replayStartTime = replayStartTime
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case eventEndTime = "EventEndTime"
            case eventLastReplayedTime = "EventLastReplayedTime"
            case eventSourceArn = "EventSourceArn"
            case eventStartTime = "EventStartTime"
            case replayEndTime = "ReplayEndTime"
            case replayName = "ReplayName"
            case replayStartTime = "ReplayStartTime"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct ReplayDestination: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the event bus to replay event to. You can replay events only to the event bus specified to create the archive.
        public let arn: String
        /// A list of ARNs for rules to replay events to.
        public let filterArns: [String]?

        @inlinable
        public init(arn: String, filterArns: [String]? = nil) {
            self.arn = arn
            self.filterArns = filterArns
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 1600)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
            try self.filterArns?.forEach {
                try validate($0, name: "filterArns[]", parent: name, max: 1600)
                try validate($0, name: "filterArns[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case filterArns = "FilterArns"
        }
    }

    public struct ReplicationConfig: AWSEncodableShape & AWSDecodableShape {
        /// The state of event replication.
        public let state: ReplicationState?

        @inlinable
        public init(state: ReplicationState? = nil) {
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
        }
    }

    public struct RetryPolicy: AWSEncodableShape & AWSDecodableShape {
        /// The maximum amount of time, in seconds, to continue to make retry attempts.
        public let maximumEventAgeInSeconds: Int?
        /// The maximum number of retry attempts to make before the request fails. Retry attempts continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is met.
        public let maximumRetryAttempts: Int?

        @inlinable
        public init(maximumEventAgeInSeconds: Int? = nil, maximumRetryAttempts: Int? = nil) {
            self.maximumEventAgeInSeconds = maximumEventAgeInSeconds
            self.maximumRetryAttempts = maximumRetryAttempts
        }

        public func validate(name: String) throws {
            try self.validate(self.maximumEventAgeInSeconds, name: "maximumEventAgeInSeconds", parent: name, max: 86400)
            try self.validate(self.maximumEventAgeInSeconds, name: "maximumEventAgeInSeconds", parent: name, min: 60)
            try self.validate(self.maximumRetryAttempts, name: "maximumRetryAttempts", parent: name, max: 185)
            try self.validate(self.maximumRetryAttempts, name: "maximumRetryAttempts", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maximumEventAgeInSeconds = "MaximumEventAgeInSeconds"
            case maximumRetryAttempts = "MaximumRetryAttempts"
        }
    }

    public struct RoutingConfig: AWSEncodableShape & AWSDecodableShape {
        /// The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.
        public let failoverConfig: FailoverConfig

        @inlinable
        public init(failoverConfig: FailoverConfig) {
            self.failoverConfig = failoverConfig
        }

        public func validate(name: String) throws {
            try self.failoverConfig.validate(name: "\(name).failoverConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case failoverConfig = "FailoverConfig"
        }
    }

    public struct Rule: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the rule.
        public let arn: String?
        /// The description of the rule.
        public let description: String?
        /// The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
        public let eventBusName: String?
        /// The event pattern of the rule. For more information, see Events and Event Patterns in the  Amazon EventBridge User Guide .
        public let eventPattern: String?
        /// If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.
        public let managedBy: String?
        /// The name of the rule.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the role that is used for target invocation. If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure, instead of here in this parameter.
        public let roleArn: String?
        /// The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
        public let scheduleExpression: String?
        /// The state of the rule. Valid values include:    DISABLED: The rule is disabled. EventBridge does not match any events against the rule.    ENABLED: The rule is enabled.  EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail.    ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail. Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the  Amazon EventBridge User Guide . This value is only valid for rules on the default event bus  or custom event buses.  It does not apply to partner event buses.
        public let state: RuleState?

        @inlinable
        public init(arn: String? = nil, description: String? = nil, eventBusName: String? = nil, eventPattern: String? = nil, managedBy: String? = nil, name: String? = nil, roleArn: String? = nil, scheduleExpression: String? = nil, state: RuleState? = nil) {
            self.arn = arn
            self.description = description
            self.eventBusName = eventBusName
            self.eventPattern = eventPattern
            self.managedBy = managedBy
            self.name = name
            self.roleArn = roleArn
            self.scheduleExpression = scheduleExpression
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case description = "Description"
            case eventBusName = "EventBusName"
            case eventPattern = "EventPattern"
            case managedBy = "ManagedBy"
            case name = "Name"
            case roleArn = "RoleArn"
            case scheduleExpression = "ScheduleExpression"
            case state = "State"
        }
    }

    public struct RunCommandParameters: AWSEncodableShape & AWSDecodableShape {
        /// Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.
        public let runCommandTargets: [RunCommandTarget]

        @inlinable
        public init(runCommandTargets: [RunCommandTarget]) {
            self.runCommandTargets = runCommandTargets
        }

        public func validate(name: String) throws {
            try self.runCommandTargets.forEach {
                try $0.validate(name: "\(name).runCommandTargets[]")
            }
            try self.validate(self.runCommandTargets, name: "runCommandTargets", parent: name, max: 5)
            try self.validate(self.runCommandTargets, name: "runCommandTargets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case runCommandTargets = "RunCommandTargets"
        }
    }

    public struct RunCommandTarget: AWSEncodableShape & AWSDecodableShape {
        /// Can be either tag: tag-key or InstanceIds.
        public let key: String
        /// If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, Values is a list of Amazon EC2 instance IDs.
        public let values: [String]

        @inlinable
        public init(key: String, values: [String]) {
            self.key = key
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$")
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 256)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
            try self.validate(self.values, name: "values", parent: name, max: 50)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case values = "Values"
        }
    }

    public struct SageMakerPipelineParameter: AWSEncodableShape & AWSDecodableShape {
        /// Name of parameter to start execution of a SageMaker AI Model Building Pipeline.
        public let name: String
        /// Value of parameter to start execution of a SageMaker AI Model Building Pipeline.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.value, name: "value", parent: name, max: 1024)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct SageMakerPipelineParameters: AWSEncodableShape & AWSDecodableShape {
        /// List of Parameter names and values for SageMaker AI Model Building Pipeline execution.
        public let pipelineParameterList: [SageMakerPipelineParameter]?

        @inlinable
        public init(pipelineParameterList: [SageMakerPipelineParameter]? = nil) {
            self.pipelineParameterList = pipelineParameterList
        }

        public func validate(name: String) throws {
            try self.pipelineParameterList?.forEach {
                try $0.validate(name: "\(name).pipelineParameterList[]")
            }
            try self.validate(self.pipelineParameterList, name: "pipelineParameterList", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case pipelineParameterList = "PipelineParameterList"
        }
    }

    public struct Secondary: AWSEncodableShape & AWSDecodableShape {
        /// Defines the secondary Region.
        public let route: String

        @inlinable
        public init(route: String) {
            self.route = route
        }

        public func validate(name: String) throws {
            try self.validate(self.route, name: "route", parent: name, max: 20)
            try self.validate(self.route, name: "route", parent: name, min: 9)
            try self.validate(self.route, name: "route", parent: name, pattern: "^[\\-a-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case route = "Route"
        }
    }

    public struct SqsParameters: AWSEncodableShape & AWSDecodableShape {
        /// The FIFO message group ID to use as the target.
        public let messageGroupId: String?

        @inlinable
        public init(messageGroupId: String? = nil) {
            self.messageGroupId = messageGroupId
        }

        public func validate(name: String) throws {
            try self.validate(self.messageGroupId, name: "messageGroupId", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case messageGroupId = "MessageGroupId"
        }
    }

    public struct StartReplayRequest: AWSEncodableShape {
        /// A description for the replay to start.
        public let description: String?
        /// A ReplayDestination object that includes details about the destination for the replay.
        public let destination: ReplayDestination
        /// A time stamp for the time to stop replaying events. Only events that occurred between the EventStartTime and EventEndTime are replayed.
        public let eventEndTime: Date
        /// The ARN of the archive to replay events from.
        public let eventSourceArn: String
        /// A time stamp for the time to start replaying events. Only events that occurred between the EventStartTime and EventEndTime are replayed.
        public let eventStartTime: Date
        /// The name of the replay to start.
        public let replayName: String

        @inlinable
        public init(description: String? = nil, destination: ReplayDestination, eventEndTime: Date, eventSourceArn: String, eventStartTime: Date, replayName: String) {
            self.description = description
            self.destination = destination
            self.eventEndTime = eventEndTime
            self.eventSourceArn = eventSourceArn
            self.eventStartTime = eventStartTime
            self.replayName = replayName
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.destination.validate(name: "\(name).destination")
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, max: 1600)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, min: 1)
            try self.validate(self.eventSourceArn, name: "eventSourceArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:.+\\/.+$")
            try self.validate(self.replayName, name: "replayName", parent: name, max: 64)
            try self.validate(self.replayName, name: "replayName", parent: name, min: 1)
            try self.validate(self.replayName, name: "replayName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case destination = "Destination"
            case eventEndTime = "EventEndTime"
            case eventSourceArn = "EventSourceArn"
            case eventStartTime = "EventStartTime"
            case replayName = "ReplayName"
        }
    }

    public struct StartReplayResponse: AWSDecodableShape {
        /// The ARN of the replay.
        public let replayArn: String?
        /// The time at which the replay started.
        public let replayStartTime: Date?
        /// The state of the replay.
        public let state: ReplayState?
        /// The reason that the replay is in the state.
        public let stateReason: String?

        @inlinable
        public init(replayArn: String? = nil, replayStartTime: Date? = nil, state: ReplayState? = nil, stateReason: String? = nil) {
            self.replayArn = replayArn
            self.replayStartTime = replayStartTime
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case replayArn = "ReplayArn"
            case replayStartTime = "ReplayStartTime"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.
        public let key: String
        /// The value for the specified tag key.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the EventBridge resource that you're adding tags to.
        public let resourceARN: String
        /// The list of key-value pairs to associate with the resource.
        public let tags: [Tag]

        @inlinable
        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1600)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Target: AWSEncodableShape & AWSDecodableShape {
        /// Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
        public let appSyncParameters: AppSyncParameters?
        /// The Amazon Resource Name (ARN) of the target.
        public let arn: String
        /// If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see Jobs in the Batch User Guide.
        public let batchParameters: BatchParameters?
        /// The DeadLetterConfig that defines the target queue to send dead-letter queue events to.
        public let deadLetterConfig: DeadLetterConfig?
        /// Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions  in the Amazon EC2 Container Service Developer Guide.
        public let ecsParameters: EcsParameters?
        /// Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination. If you specify an API Gateway API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.
        public let httpParameters: HttpParameters?
        /// The ID of the target within the specified rule. Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string.
        public let id: String
        /// Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.
        public let input: String?
        /// The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath.
        public let inputPath: String?
        /// Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.
        public let inputTransformer: InputTransformer?
        /// The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the eventId as the partition key.
        public let kinesisParameters: KinesisParameters?
        /// Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster. If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.
        public let redshiftDataParameters: RedshiftDataParameters?
        /// The retry policy configuration to use for the dead-letter queue.
        public let retryPolicy: RetryPolicy?
        /// The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.
        public let roleArn: String?
        /// Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
        public let runCommandParameters: RunCommandParameters?
        /// Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline. If you specify a SageMaker AI Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
        public let sageMakerPipelineParameters: SageMakerPipelineParameters?
        /// Contains the message group ID to use when the target is a FIFO queue. If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.
        public let sqsParameters: SqsParameters?

        @inlinable
        public init(appSyncParameters: AppSyncParameters? = nil, arn: String, batchParameters: BatchParameters? = nil, deadLetterConfig: DeadLetterConfig? = nil, ecsParameters: EcsParameters? = nil, httpParameters: HttpParameters? = nil, id: String, input: String? = nil, inputPath: String? = nil, inputTransformer: InputTransformer? = nil, kinesisParameters: KinesisParameters? = nil, redshiftDataParameters: RedshiftDataParameters? = nil, retryPolicy: RetryPolicy? = nil, roleArn: String? = nil, runCommandParameters: RunCommandParameters? = nil, sageMakerPipelineParameters: SageMakerPipelineParameters? = nil, sqsParameters: SqsParameters? = nil) {
            self.appSyncParameters = appSyncParameters
            self.arn = arn
            self.batchParameters = batchParameters
            self.deadLetterConfig = deadLetterConfig
            self.ecsParameters = ecsParameters
            self.httpParameters = httpParameters
            self.id = id
            self.input = input
            self.inputPath = inputPath
            self.inputTransformer = inputTransformer
            self.kinesisParameters = kinesisParameters
            self.redshiftDataParameters = redshiftDataParameters
            self.retryPolicy = retryPolicy
            self.roleArn = roleArn
            self.runCommandParameters = runCommandParameters
            self.sageMakerPipelineParameters = sageMakerPipelineParameters
            self.sqsParameters = sqsParameters
        }

        public func validate(name: String) throws {
            try self.appSyncParameters?.validate(name: "\(name).appSyncParameters")
            try self.validate(self.arn, name: "arn", parent: name, max: 1600)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
            try self.deadLetterConfig?.validate(name: "\(name).deadLetterConfig")
            try self.ecsParameters?.validate(name: "\(name).ecsParameters")
            try self.httpParameters?.validate(name: "\(name).httpParameters")
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.input, name: "input", parent: name, max: 8192)
            try self.validate(self.inputPath, name: "inputPath", parent: name, max: 256)
            try self.inputTransformer?.validate(name: "\(name).inputTransformer")
            try self.kinesisParameters?.validate(name: "\(name).kinesisParameters")
            try self.redshiftDataParameters?.validate(name: "\(name).redshiftDataParameters")
            try self.retryPolicy?.validate(name: "\(name).retryPolicy")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1600)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.runCommandParameters?.validate(name: "\(name).runCommandParameters")
            try self.sageMakerPipelineParameters?.validate(name: "\(name).sageMakerPipelineParameters")
            try self.sqsParameters?.validate(name: "\(name).sqsParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case appSyncParameters = "AppSyncParameters"
            case arn = "Arn"
            case batchParameters = "BatchParameters"
            case deadLetterConfig = "DeadLetterConfig"
            case ecsParameters = "EcsParameters"
            case httpParameters = "HttpParameters"
            case id = "Id"
            case input = "Input"
            case inputPath = "InputPath"
            case inputTransformer = "InputTransformer"
            case kinesisParameters = "KinesisParameters"
            case redshiftDataParameters = "RedshiftDataParameters"
            case retryPolicy = "RetryPolicy"
            case roleArn = "RoleArn"
            case runCommandParameters = "RunCommandParameters"
            case sageMakerPipelineParameters = "SageMakerPipelineParameters"
            case sqsParameters = "SqsParameters"
        }
    }

    public struct TestEventPatternRequest: AWSEncodableShape {
        /// The event, in JSON format, to test against the event pattern. The JSON must follow the format specified in Amazon Web Services Events, and the following fields are mandatory:    id     account     source     time     region     resources     detail-type
        public let event: String
        /// The event pattern. For more information, see Events and Event Patterns in the  Amazon EventBridge User Guide .
        public let eventPattern: String

        @inlinable
        public init(event: String, eventPattern: String) {
            self.event = event
            self.eventPattern = eventPattern
        }

        public func validate(name: String) throws {
            try self.validate(self.eventPattern, name: "eventPattern", parent: name, max: 4096)
        }

        private enum CodingKeys: String, CodingKey {
            case event = "Event"
            case eventPattern = "EventPattern"
        }
    }

    public struct TestEventPatternResponse: AWSDecodableShape {
        /// Indicates whether the event matches the event pattern.
        public let result: Bool?

        @inlinable
        public init(result: Bool? = nil) {
            self.result = result
        }

        private enum CodingKeys: String, CodingKey {
            case result = "Result"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the EventBridge resource from which you are removing tags.
        public let resourceARN: String
        /// The list of tag keys to remove from the resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1600)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateApiDestinationRequest: AWSEncodableShape {
        /// The ARN of the connection to use for the API destination.
        public let connectionArn: String?
        /// The name of the API destination to update.
        public let description: String?
        /// The method to use for the API destination.
        public let httpMethod: ApiDestinationHttpMethod?
        /// The URL to the endpoint to use for the API destination.
        public let invocationEndpoint: String?
        /// The maximum number of invocations per second to send to the API destination.
        public let invocationRateLimitPerSecond: Int?
        /// The name of the API destination to update.
        public let name: String

        @inlinable
        public init(connectionArn: String? = nil, description: String? = nil, httpMethod: ApiDestinationHttpMethod? = nil, invocationEndpoint: String? = nil, invocationRateLimitPerSecond: Int? = nil, name: String) {
            self.connectionArn = connectionArn
            self.description = description
            self.httpMethod = httpMethod
            self.invocationEndpoint = invocationEndpoint
            self.invocationRateLimitPerSecond = invocationRateLimitPerSecond
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, max: 1600)
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, min: 1)
            try self.validate(self.connectionArn, name: "connectionArn", parent: name, pattern: "^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:connection\\/[\\.\\-_A-Za-z0-9]+\\/[\\-A-Za-z0-9]+$")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.validate(self.invocationEndpoint, name: "invocationEndpoint", parent: name, max: 2048)
            try self.validate(self.invocationEndpoint, name: "invocationEndpoint", parent: name, min: 1)
            try self.validate(self.invocationEndpoint, name: "invocationEndpoint", parent: name, pattern: "^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@\\x26=+$,A-Za-z0-9])+)([).!';/?:,])?$")
            try self.validate(self.invocationRateLimitPerSecond, name: "invocationRateLimitPerSecond", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case description = "Description"
            case httpMethod = "HttpMethod"
            case invocationEndpoint = "InvocationEndpoint"
            case invocationRateLimitPerSecond = "InvocationRateLimitPerSecond"
            case name = "Name"
        }
    }

    public struct UpdateApiDestinationResponse: AWSDecodableShape {
        /// The ARN of the API destination that was updated.
        public let apiDestinationArn: String?
        /// The state of the API destination that was updated.
        public let apiDestinationState: ApiDestinationState?
        /// A time stamp for the time that the API destination was created.
        public let creationTime: Date?
        /// A time stamp for the time that the API destination was last modified.
        public let lastModifiedTime: Date?

        @inlinable
        public init(apiDestinationArn: String? = nil, apiDestinationState: ApiDestinationState? = nil, creationTime: Date? = nil, lastModifiedTime: Date? = nil) {
            self.apiDestinationArn = apiDestinationArn
            self.apiDestinationState = apiDestinationState
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
        }

        private enum CodingKeys: String, CodingKey {
            case apiDestinationArn = "ApiDestinationArn"
            case apiDestinationState = "ApiDestinationState"
            case creationTime = "CreationTime"
            case lastModifiedTime = "LastModifiedTime"
        }
    }

    public struct UpdateArchiveRequest: AWSEncodableShape {
        /// The name of the archive to update.
        public let archiveName: String
        /// The description for the archive.
        public let description: String?
        /// The event pattern to use to filter events sent to the archive.
        public let eventPattern: String?
        /// The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key  Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive. For more information, see Identify and view keys in the Key Management Service Developer Guide.   If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a  customer managed key for any archives for the event bus as well.  For more information, see Encrypting archives in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The number of days to retain events in the archive.
        public let retentionDays: Int?

        @inlinable
        public init(archiveName: String, description: String? = nil, eventPattern: String? = nil, kmsKeyIdentifier: String? = nil, retentionDays: Int? = nil) {
            self.archiveName = archiveName
            self.description = description
            self.eventPattern = eventPattern
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.retentionDays = retentionDays
        }

        public func validate(name: String) throws {
            try self.validate(self.archiveName, name: "archiveName", parent: name, max: 48)
            try self.validate(self.archiveName, name: "archiveName", parent: name, min: 1)
            try self.validate(self.archiveName, name: "archiveName", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.validate(self.eventPattern, name: "eventPattern", parent: name, max: 4096)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, max: 2048)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, pattern: "^[a-zA-Z0-9_\\-/:]*$")
            try self.validate(self.retentionDays, name: "retentionDays", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case archiveName = "ArchiveName"
            case description = "Description"
            case eventPattern = "EventPattern"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case retentionDays = "RetentionDays"
        }
    }

    public struct UpdateArchiveResponse: AWSDecodableShape {
        /// The ARN of the archive.
        public let archiveArn: String?
        /// The time at which the archive was updated.
        public let creationTime: Date?
        /// The state of the archive.
        public let state: ArchiveState?
        /// The reason that the archive is in the current state.
        public let stateReason: String?

        @inlinable
        public init(archiveArn: String? = nil, creationTime: Date? = nil, state: ArchiveState? = nil, stateReason: String? = nil) {
            self.archiveArn = archiveArn
            self.creationTime = creationTime
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case archiveArn = "ArchiveArn"
            case creationTime = "CreationTime"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct UpdateConnectionApiKeyAuthRequestParameters: AWSEncodableShape {
        /// The name of the API key to use for authorization.
        public let apiKeyName: String?
        /// The value associated with the API key to use for authorization.
        public let apiKeyValue: String?

        @inlinable
        public init(apiKeyName: String? = nil, apiKeyValue: String? = nil) {
            self.apiKeyName = apiKeyName
            self.apiKeyValue = apiKeyValue
        }

        public func validate(name: String) throws {
            try self.validate(self.apiKeyName, name: "apiKeyName", parent: name, max: 512)
            try self.validate(self.apiKeyName, name: "apiKeyName", parent: name, min: 1)
            try self.validate(self.apiKeyName, name: "apiKeyName", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
            try self.validate(self.apiKeyValue, name: "apiKeyValue", parent: name, max: 512)
            try self.validate(self.apiKeyValue, name: "apiKeyValue", parent: name, min: 1)
            try self.validate(self.apiKeyValue, name: "apiKeyValue", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case apiKeyName = "ApiKeyName"
            case apiKeyValue = "ApiKeyValue"
        }
    }

    public struct UpdateConnectionAuthRequestParameters: AWSEncodableShape {
        /// The authorization parameters for API key authorization.
        public let apiKeyAuthParameters: UpdateConnectionApiKeyAuthRequestParameters?
        /// The authorization parameters for Basic authorization.
        public let basicAuthParameters: UpdateConnectionBasicAuthRequestParameters?
        /// If you specify a private OAuth endpoint, the parameters for EventBridge to use when authenticating against the endpoint. For more information, see Authorization methods for connections in the  Amazon EventBridge User Guide .
        public let connectivityParameters: ConnectivityResourceParameters?
        /// The additional parameters to use for the connection.
        public let invocationHttpParameters: ConnectionHttpParameters?
        /// The authorization parameters for OAuth authorization.
        public let oAuthParameters: UpdateConnectionOAuthRequestParameters?

        @inlinable
        public init(apiKeyAuthParameters: UpdateConnectionApiKeyAuthRequestParameters? = nil, basicAuthParameters: UpdateConnectionBasicAuthRequestParameters? = nil, connectivityParameters: ConnectivityResourceParameters? = nil, invocationHttpParameters: ConnectionHttpParameters? = nil, oAuthParameters: UpdateConnectionOAuthRequestParameters? = nil) {
            self.apiKeyAuthParameters = apiKeyAuthParameters
            self.basicAuthParameters = basicAuthParameters
            self.connectivityParameters = connectivityParameters
            self.invocationHttpParameters = invocationHttpParameters
            self.oAuthParameters = oAuthParameters
        }

        public func validate(name: String) throws {
            try self.apiKeyAuthParameters?.validate(name: "\(name).apiKeyAuthParameters")
            try self.basicAuthParameters?.validate(name: "\(name).basicAuthParameters")
            try self.connectivityParameters?.validate(name: "\(name).connectivityParameters")
            try self.invocationHttpParameters?.validate(name: "\(name).invocationHttpParameters")
            try self.oAuthParameters?.validate(name: "\(name).oAuthParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case apiKeyAuthParameters = "ApiKeyAuthParameters"
            case basicAuthParameters = "BasicAuthParameters"
            case connectivityParameters = "ConnectivityParameters"
            case invocationHttpParameters = "InvocationHttpParameters"
            case oAuthParameters = "OAuthParameters"
        }
    }

    public struct UpdateConnectionBasicAuthRequestParameters: AWSEncodableShape {
        /// The password associated with the user name to use for Basic authorization.
        public let password: String?
        /// The user name to use for Basic authorization.
        public let username: String?

        @inlinable
        public init(password: String? = nil, username: String? = nil) {
            self.password = password
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.password, name: "password", parent: name, max: 512)
            try self.validate(self.password, name: "password", parent: name, min: 1)
            try self.validate(self.password, name: "password", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
            try self.validate(self.username, name: "username", parent: name, max: 512)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case password = "Password"
            case username = "Username"
        }
    }

    public struct UpdateConnectionOAuthClientRequestParameters: AWSEncodableShape {
        /// The client ID to use for OAuth authorization.
        public let clientID: String?
        /// The client secret assciated with the client ID to use for OAuth authorization.
        public let clientSecret: String?

        @inlinable
        public init(clientID: String? = nil, clientSecret: String? = nil) {
            self.clientID = clientID
            self.clientSecret = clientSecret
        }

        public func validate(name: String) throws {
            try self.validate(self.clientID, name: "clientID", parent: name, max: 512)
            try self.validate(self.clientID, name: "clientID", parent: name, min: 1)
            try self.validate(self.clientID, name: "clientID", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, max: 512)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, min: 1)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, pattern: "^[ \\t]*[^\\x00-\\x1F:\\x7F]+([ \\t]+[^\\x00-\\x1F:\\x7F]+)*[ \\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientID = "ClientID"
            case clientSecret = "ClientSecret"
        }
    }

    public struct UpdateConnectionOAuthRequestParameters: AWSEncodableShape {
        /// The URL to the authorization endpoint when OAuth is specified as the authorization type.
        public let authorizationEndpoint: String?
        /// The client parameters to use for the connection when OAuth is specified as the authorization type.
        public let clientParameters: UpdateConnectionOAuthClientRequestParameters?
        /// The method used to connect to the HTTP endpoint.
        public let httpMethod: ConnectionOAuthHttpMethod?
        /// The additional HTTP parameters used for the OAuth authorization request.
        public let oAuthHttpParameters: ConnectionHttpParameters?

        @inlinable
        public init(authorizationEndpoint: String? = nil, clientParameters: UpdateConnectionOAuthClientRequestParameters? = nil, httpMethod: ConnectionOAuthHttpMethod? = nil, oAuthHttpParameters: ConnectionHttpParameters? = nil) {
            self.authorizationEndpoint = authorizationEndpoint
            self.clientParameters = clientParameters
            self.httpMethod = httpMethod
            self.oAuthHttpParameters = oAuthHttpParameters
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizationEndpoint, name: "authorizationEndpoint", parent: name, max: 2048)
            try self.validate(self.authorizationEndpoint, name: "authorizationEndpoint", parent: name, min: 1)
            try self.validate(self.authorizationEndpoint, name: "authorizationEndpoint", parent: name, pattern: "^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@\\x26=+$,A-Za-z0-9])+)([).!';/?:,])?$")
            try self.clientParameters?.validate(name: "\(name).clientParameters")
            try self.oAuthHttpParameters?.validate(name: "\(name).oAuthHttpParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationEndpoint = "AuthorizationEndpoint"
            case clientParameters = "ClientParameters"
            case httpMethod = "HttpMethod"
            case oAuthHttpParameters = "OAuthHttpParameters"
        }
    }

    public struct UpdateConnectionRequest: AWSEncodableShape {
        /// The type of authorization to use for the connection.
        public let authorizationType: ConnectionAuthorizationType?
        /// The authorization parameters to use for the connection.
        public let authParameters: UpdateConnectionAuthRequestParameters?
        /// A description for the connection.
        public let description: String?
        /// For connections to private APIs, the parameters to use for invoking the API. For more information, see Connecting to private APIs in the  Amazon EventBridge User Guide .
        public let invocationConnectivityParameters: ConnectivityResourceParameters?
        /// The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key  Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection. For more information, see Identify and view keys in the Key Management Service Developer Guide.
        public let kmsKeyIdentifier: String?
        /// The name of the connection to update.
        public let name: String

        @inlinable
        public init(authorizationType: ConnectionAuthorizationType? = nil, authParameters: UpdateConnectionAuthRequestParameters? = nil, description: String? = nil, invocationConnectivityParameters: ConnectivityResourceParameters? = nil, kmsKeyIdentifier: String? = nil, name: String) {
            self.authorizationType = authorizationType
            self.authParameters = authParameters
            self.description = description
            self.invocationConnectivityParameters = invocationConnectivityParameters
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.name = name
        }

        public func validate(name: String) throws {
            try self.authParameters?.validate(name: "\(name).authParameters")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.invocationConnectivityParameters?.validate(name: "\(name).invocationConnectivityParameters")
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, max: 2048)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, pattern: "^[a-zA-Z0-9_\\-/:]*$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationType = "AuthorizationType"
            case authParameters = "AuthParameters"
            case description = "Description"
            case invocationConnectivityParameters = "InvocationConnectivityParameters"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case name = "Name"
        }
    }

    public struct UpdateConnectionResponse: AWSDecodableShape {
        /// The ARN of the connection that was updated.
        public let connectionArn: String?
        /// The state of the connection that was updated.
        public let connectionState: ConnectionState?
        /// A time stamp for the time that the connection was created.
        public let creationTime: Date?
        /// A time stamp for the time that the connection was last authorized.
        public let lastAuthorizedTime: Date?
        /// A time stamp for the time that the connection was last modified.
        public let lastModifiedTime: Date?

        @inlinable
        public init(connectionArn: String? = nil, connectionState: ConnectionState? = nil, creationTime: Date? = nil, lastAuthorizedTime: Date? = nil, lastModifiedTime: Date? = nil) {
            self.connectionArn = connectionArn
            self.connectionState = connectionState
            self.creationTime = creationTime
            self.lastAuthorizedTime = lastAuthorizedTime
            self.lastModifiedTime = lastModifiedTime
        }

        private enum CodingKeys: String, CodingKey {
            case connectionArn = "ConnectionArn"
            case connectionState = "ConnectionState"
            case creationTime = "CreationTime"
            case lastAuthorizedTime = "LastAuthorizedTime"
            case lastModifiedTime = "LastModifiedTime"
        }
    }

    public struct UpdateEndpointRequest: AWSEncodableShape {
        /// A description for the endpoint.
        public let description: String?
        /// Define event buses used for replication.
        public let eventBuses: [EndpointEventBus]?
        /// The name of the endpoint you want to update.
        public let name: String
        /// Whether event replication was enabled or disabled by this request.
        public let replicationConfig: ReplicationConfig?
        /// The ARN of the role used by event replication for this request.
        public let roleArn: String?
        /// Configure the routing policy, including the health check and secondary Region.
        public let routingConfig: RoutingConfig?

        @inlinable
        public init(description: String? = nil, eventBuses: [EndpointEventBus]? = nil, name: String, replicationConfig: ReplicationConfig? = nil, roleArn: String? = nil, routingConfig: RoutingConfig? = nil) {
            self.description = description
            self.eventBuses = eventBuses
            self.name = name
            self.replicationConfig = replicationConfig
            self.roleArn = roleArn
            self.routingConfig = routingConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.description, name: "description", parent: name, pattern: ".*")
            try self.eventBuses?.forEach {
                try $0.validate(name: "\(name).eventBuses[]")
            }
            try self.validate(self.eventBuses, name: "eventBuses", parent: name, max: 2)
            try self.validate(self.eventBuses, name: "eventBuses", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_A-Za-z0-9]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 256)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws[a-z-]*:iam::\\d{12}:role\\/[\\w+=,.@/-]+$")
            try self.routingConfig?.validate(name: "\(name).routingConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case eventBuses = "EventBuses"
            case name = "Name"
            case replicationConfig = "ReplicationConfig"
            case roleArn = "RoleArn"
            case routingConfig = "RoutingConfig"
        }
    }

    public struct UpdateEndpointResponse: AWSDecodableShape {
        /// The ARN of the endpoint you updated in this request.
        public let arn: String?
        /// The ID of the endpoint you updated in this request.
        public let endpointId: String?
        /// The URL of the endpoint you updated in this request.
        public let endpointUrl: String?
        /// The event buses used for replication for the endpoint you updated in this request.
        public let eventBuses: [EndpointEventBus]?
        /// The name of the endpoint you updated in this request.
        public let name: String?
        /// Whether event replication was enabled or disabled for the endpoint you updated in this request.
        public let replicationConfig: ReplicationConfig?
        /// The ARN of the role used by event replication for the endpoint you updated in this request.
        public let roleArn: String?
        /// The routing configuration you updated in this request.
        public let routingConfig: RoutingConfig?
        /// The state of the endpoint you updated in this request.
        public let state: EndpointState?

        @inlinable
        public init(arn: String? = nil, endpointId: String? = nil, endpointUrl: String? = nil, eventBuses: [EndpointEventBus]? = nil, name: String? = nil, replicationConfig: ReplicationConfig? = nil, roleArn: String? = nil, routingConfig: RoutingConfig? = nil, state: EndpointState? = nil) {
            self.arn = arn
            self.endpointId = endpointId
            self.endpointUrl = endpointUrl
            self.eventBuses = eventBuses
            self.name = name
            self.replicationConfig = replicationConfig
            self.roleArn = roleArn
            self.routingConfig = routingConfig
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case endpointId = "EndpointId"
            case endpointUrl = "EndpointUrl"
            case eventBuses = "EventBuses"
            case name = "Name"
            case replicationConfig = "ReplicationConfig"
            case roleArn = "RoleArn"
            case routingConfig = "RoutingConfig"
            case state = "State"
        }
    }

    public struct UpdateEventBusRequest: AWSEncodableShape {
        public let deadLetterConfig: DeadLetterConfig?
        /// The event bus description.
        public let description: String?
        /// The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key  Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus. For more information, see Identify and view keys in the Key Management Service Developer Guide.   Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:    You call  CreateDiscoverer on an event bus set to use a customer managed key for encryption.   You call  UpdatedEventBus to set a customer managed key on an event bus with schema discovery enabled.   To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Encrypting events in the Amazon EventBridge User Guide.   If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a  customer managed key for any archives for the event bus as well.  For more information, see Encrypting archives in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
        public let logConfig: LogConfig?
        /// The name of the event bus.
        public let name: String?

        @inlinable
        public init(deadLetterConfig: DeadLetterConfig? = nil, description: String? = nil, kmsKeyIdentifier: String? = nil, logConfig: LogConfig? = nil, name: String? = nil) {
            self.deadLetterConfig = deadLetterConfig
            self.description = description
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.logConfig = logConfig
            self.name = name
        }

        public func validate(name: String) throws {
            try self.deadLetterConfig?.validate(name: "\(name).deadLetterConfig")
            try self.validate(self.description, name: "description", parent: name, max: 512)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, max: 2048)
            try self.validate(self.kmsKeyIdentifier, name: "kmsKeyIdentifier", parent: name, pattern: "^[a-zA-Z0-9_\\-/:]*$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[/\\.\\-_A-Za-z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deadLetterConfig = "DeadLetterConfig"
            case description = "Description"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case logConfig = "LogConfig"
            case name = "Name"
        }
    }

    public struct UpdateEventBusResponse: AWSDecodableShape {
        /// The event bus Amazon Resource Name (ARN).
        public let arn: String?
        public let deadLetterConfig: DeadLetterConfig?
        /// The event bus description.
        public let description: String?
        /// The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.
        public let kmsKeyIdentifier: String?
        /// The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
        public let logConfig: LogConfig?
        /// The event bus name.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, deadLetterConfig: DeadLetterConfig? = nil, description: String? = nil, kmsKeyIdentifier: String? = nil, logConfig: LogConfig? = nil, name: String? = nil) {
            self.arn = arn
            self.deadLetterConfig = deadLetterConfig
            self.description = description
            self.kmsKeyIdentifier = kmsKeyIdentifier
            self.logConfig = logConfig
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case deadLetterConfig = "DeadLetterConfig"
            case description = "Description"
            case kmsKeyIdentifier = "KmsKeyIdentifier"
            case logConfig = "LogConfig"
            case name = "Name"
        }
    }
}

// MARK: - Errors

/// Error enum for EventBridge
public struct EventBridgeErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case concurrentModificationException = "ConcurrentModificationException"
        case illegalStatusException = "IllegalStatusException"
        case internalException = "InternalException"
        case invalidEventPatternException = "InvalidEventPatternException"
        case invalidStateException = "InvalidStateException"
        case limitExceededException = "LimitExceededException"
        case managedRuleException = "ManagedRuleException"
        case operationDisabledException = "OperationDisabledException"
        case policyLengthExceededException = "PolicyLengthExceededException"
        case resourceAlreadyExistsException = "ResourceAlreadyExistsException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case throttlingException = "ThrottlingException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize EventBridge
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You do not have the necessary permissions for this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// There is concurrent modification on a rule, target, archive, or replay.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// An error occurred because a replay can be canceled only when the state is Running or Starting.
    public static var illegalStatusException: Self { .init(.illegalStatusException) }
    /// This exception occurs due to unexpected causes.
    public static var internalException: Self { .init(.internalException) }
    /// The event pattern is not valid.
    public static var invalidEventPatternException: Self { .init(.invalidEventPatternException) }
    /// The specified state is not a valid state for an event source.
    public static var invalidStateException: Self { .init(.invalidStateException) }
    /// The request failed because it attempted to create resource beyond the allowed service quota.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// This rule was created by an Amazon Web Services service on behalf of your account. It is managed by that service. If you see this error in response to DeleteRule or RemoveTargets, you can use the Force parameter in those calls to delete the rule or remove targets from the rule. You cannot modify these managed rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, or UntagResource.
    public static var managedRuleException: Self { .init(.managedRuleException) }
    /// The operation you are attempting is not available in this region.
    public static var operationDisabledException: Self { .init(.operationDisabledException) }
    /// The event bus policy is too long. For more information, see the limits.
    public static var policyLengthExceededException: Self { .init(.policyLengthExceededException) }
    /// The resource you are trying to create already exists.
    public static var resourceAlreadyExistsException: Self { .init(.resourceAlreadyExistsException) }
    /// An entity that you specified does not exist.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// This request cannot be completed due to throttling issues.
    public static var throttlingException: Self { .init(.throttlingException) }
}

extension EventBridgeErrorType: Equatable {
    public static func == (lhs: EventBridgeErrorType, rhs: EventBridgeErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension EventBridgeErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
